Bug or Intentional behaviour?
Bug or Intentional behaviour?
- Subject: Bug or Intentional behaviour?
- From: Graham Cox <email@hidden>
- Date: Mon, 25 Apr 2016 11:14:08 +1000
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 (email@hidden)
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:
This email sent to email@hidden