Re: How do I get keyboard events in an NSStatusWindowLevel window while my application is not frontmost?
Re: How do I get keyboard events in an NSStatusWindowLevel window while my application is not frontmost?
- Subject: Re: How do I get keyboard events in an NSStatusWindowLevel window while my application is not frontmost?
- From: Daniel Káčer <email@hidden>
- Date: Thu, 18 Feb 2010 20:19:23 +0100
thank you very much ... your second hint was what I needed to know :)
Donald
On Feb 18, 2010, at 19:03 , Jens Alfke wrote:
On Feb 18, 2010, at 9:22 AM, Daniel Káčer wrote:
After creating a translucent NSPanel and I want to get keyboard
events in this window. It seems that there are only keyboard events
when my application is the active application while I want keyboard
events even when my application isn't active but the window is
visible.
Basically I want behavior like that provided by the Quicksilver
application.
If you want to handle a particular keystroke (like Quicksilver's Ctrl-
Space) no matter what app is active, define a system hot-key. There is
sample code showing how to do this, but I don't know an exact name or
URL.
Once your hot key has triggered, call [NSApp
activateIgnoringOtherApps: YES] and [myWindow makeKeyAndOrderFront:
nil], so your window will have focus and will receive typing.
—Jens
_______________________________________________
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