• 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
Re: How do I get keyboard events in an NSStatusWindowLevel window while my application is not frontmost?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >How do I get keyboard events in an NSStatusWindowLevel window while my application is not frontmost? (From: Daniel Káčer <email@hidden>)
 >Re: How do I get keyboard events in an NSStatusWindowLevel window while my application is not frontmost? (From: Jens Alfke <email@hidden>)

  • Prev by Date: Hillegass printing challenge
  • Next by Date: NSWindow - how to resize it keeping aspect ratio?
  • Previous by thread: Re: How do I get keyboard events in an NSStatusWindowLevel window while my application is not frontmost?
  • Next by thread: Hillegass printing challenge
  • Index(es):
    • Date
    • Thread