Post

Replies

Boosts

Views

Activity

Comment on Key equivalent matching for non-US English keyboard layouts
Interestingly, [NSEvent _matchesKeyEquivalent:modifierMask:] returns YES for a real key event: NSEvent: type=KeyDown loc=(21.2695,-129.457) time=78998.2 flags=0x100108 win=0x13227f2c0 winNum=2566 ctxt=0x0 chars="c" unmodchars="ב" repeat=0 keyCode=8 But NO for a synthesized event via [NSEvent keyEventWithType] NSEvent: type=KeyDown loc=(0,0) time=0.0 flags=0x100000 win=0x0 winNum=0 ctxt=0x0 chars="c" unmodchars="ב" repeat=0 keyCode=8
Topic: UI Frameworks SubTopic: AppKit Tags:
May ’23
Comment on Key equivalent matching for non-US English keyboard layouts
The flags, location, time, window, and winNumber might affect this, or perhaps [NSEvent _matchesKeyEquivalent:modifierMask:] also looks at state outside of the arguments?
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
May ’23
Comment on Key equivalent matching for non-US English keyboard layouts
Interestingly, [NSEvent _matchesKeyEquivalent:modifierMask:] returns YES for a real key event: NSEvent: type=KeyDown loc=(21.2695,-129.457) time=78998.2 flags=0x100108 win=0x13227f2c0 winNum=2566 ctxt=0x0 chars="c" unmodchars="ב" repeat=0 keyCode=8 But NO for a synthesized event via [NSEvent keyEventWithType] NSEvent: type=KeyDown loc=(0,0) time=0.0 flags=0x100000 win=0x0 winNum=0 ctxt=0x0 chars="c" unmodchars="ב" repeat=0 keyCode=8
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
May ’23