• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Bug or Intentional behaviour?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: How to Truncate lines in NSScrollView/NSClipView/NSTextView Combo
  • Next by Date: Re: How to Truncate lines in NSScrollView/NSClipView/NSTextView Combo
  • Previous by thread: Re: How to Truncate lines in NSScrollView/NSClipView/NSTextView Combo
  • Next by thread: Code to Stack or Tile Windows
  • Index(es):
    • Date
    • Thread