On Aug 6, 2009, at 7:03 PM, Dimcho Balev wrote:

I have a trouble with a piece of code which behaves differently  on
Tiger (Mactel) in comparison to Leopard.

It is pretty simple case: our cocoa app is interested in cmd+key
shortcuts and we have overriden the keyDown and keyUp methods in our
NSWindow inherited class. On Leopard we receive all of the key events
without a problem but on Tiger the standard cmd+key events (cmd+c, cmd
+v, cmd+x, cmd+a) are filtered out. I tried out few other approaches -
for instance using flagsChanged to detect the cmd key status but I
never receive an event for the 2nd key (m,c,v,x, or a) of the shortcut.

I am wondering if this is known issue with Tiger and if there is any
workaround.

When you suspect a difference between two versions of the OS, you should see if it's mentioned in the release notes of the newer version(s). In this case, check the Leopard AppKit release notes <http://developer.apple.com/releasenotes/Cocoa/AppKit.html > and search for "key equivalents". You'll find this:

"In -[NSWindow sendEvent:] we now send keyDown: to the first responder even if the command-key modifier is set. An NSKeyDown event will only reach this point if it was not recognized as a key equivalent. One effect of this change is to enable custom key binding entries with command-key modifiers. The change applies only to applications built on Leopard or later, to preserve binary compatibility for any application which may have been dependent on the old behavior."

Regards,
Ken

_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to