Re[2]: Mac shortcut keys issue. Keys being sent to parent frame window.

Vadim Zeitlin <[email protected]> Wed, 26 Mar 2025 22:20:16 +0100
Newsgroups gmane.comp.lib.wxwindows.general
Message-ID <[email protected]>
On Tue, 25 Mar 2025 09:52:10 -0700 (PDT) Tony Kennedy wrote:

TK> No problem.  I'm not familiar with objective C at all and not even sure if 
TK> the code below is objective C or Swift.

 It's Objective-C++ (as indicated by .mm extension, rather than the
standard .m for Objective-C), we don't use Swift.

TK> I'm trying to trace things. In utils.m, I found the sendEvent function. And 
TK> in it, there is a test for NSKeyUp, and the Apple docs say that it's 
TK> depreciated. It also says there is an AppKit bug.
TK> 
TK> https://developer.apple.com/documentation/appkit/nskeyup
TK> 
TK> I tried replacing NSKeyUp with NSEvent.EventType.keyUp 
TK> <https://developer.apple.com/documentation/appkit/nsevent/eventtype/keyup>, 
TK> but it refuses to compile so I'm stuck.

 What was the intention behind this change? NSKeyUp is perfectly fine...

 Perhaps it would be worth removing this "if" (or even this entire
function) entirely -- maybe it's indeed why you get the events in a wrong
window (although I'm not sure, as I'd expect the key window to be the
palette window).

 Regards,
VZ

-- 
TT-Solutions: wxWidgets consultancy and technical support
              https://www.tt-solutions.com/
signature.asc (application/pgp-signature, 195 B)
-----BEGIN PGP SIGNATURE-----

iF0EABECAB0WIQQx+vLQdOwioQqkxtoG6kHeT2wehgUCZ+RvkAAKCRAG6kHeT2we
hrChAKCeMfd5if6QlTYsYjSfR/HCyRmFKwCfS75kjFqMD4mGKzv8Zhbz/cfJ4Vc=
=KIUy
-----END PGP SIGNATURE-----