Re: Disabling key bindings
Re: Disabling key bindings
- Subject: Re: Disabling key bindings
- From: Ken Thomases <email@hidden>
- Date: Thu, 5 Mar 2009 14:29:04 -0600
On Mar 5, 2009, at 2:18 PM, Shayne Wissler wrote:
On Thu, Mar 5, 2009 at 12:17 PM, Ken Thomases <email@hidden>
wrote:
On Mar 5, 2009, at 11:59 AM, Shayne Wissler wrote:
I have an application in which the user's normal OSX key bindings
are
meaningless, and while they are in that application I would like
to detect
any keyboard event. Right now I am using KeyDown, KeyUp, and
FlagsChanged,
but these of course are subject to the user's key bindings.
No, they're not. These deal in raw keyboard events.
So why don't I get events for F1-F4, F7-12? I was assuming it was
because
they were bound, evidently there's a different level of key binding
going
on?
I suspect you would if you used the "fn" key with them. In System
Preferences, Keyboard & Mouse pane, Keyboard tab, take a look at the
"Use all F1, F2, etc. keys as standard function keys" checkbox.
Unless that is checked, the function keys you refer to are acting as
"hardware" keys.
This is not part of the Cocoa key bindings technology. It's happening
at a lower level than that. You can check to see if a Quartz Event
Tap gives you access to those key events, but even that might not.
Another thing to be aware of is the Keyboard Shortcuts tab of that
preference pane. Shortcuts assigned there are also not part of the
Cocoa key bindings system, but you do have some more control over
them. If you override -[NSApplication sendEvent:] you can see those
key events and even prevent their normal processing.
See <http://developer.apple.com/documentation/Cocoa/Conceptual/EventOverview/HandlingKeyEvents/chapter_6_section_3.html
>.
Thanks for the link.
You're welcome.
Cheers,
Ken
_______________________________________________
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