I’ve noticed a problem with the way key events are sent to views (at least in 10.11.4, but it’s likely a longstanding issue).
If I type an ordinary key, I get a -keyDown:, when I release it, I get a -keyUp: If I type an ordinary key with the command key down, and the key isn’t a menu shortcut, I get the -keyDown:, but never receive a -keyUp: If I type an ordinary key (getting the -keyDown:), keep it held, press command, then release the first key, I also get no -keyUp: This only happens with the command modifier, not any of the others. This is proving to be a nuisance because my app uses a keyup/keydown pair to set a temporary mode that persists only while a key is held. Without the keyup, the mode doesn’t recognise when to end. I can mitigate this somewhat in my code, but ultimately the lack of a -keyUp: is the real problem. Is this a bug or is it intentional? Why wouldn’t a cmd-key combo (that wasn’t a menu shortcut) NOT send a keyup? —Graham _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com