• 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
Stealing keyboard focus without activating
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Stealing keyboard focus without activating


  • Subject: Stealing keyboard focus without activating
  • From: Ingvar Nedrebo <email@hidden>
  • Date: Sat, 8 Jul 2006 15:39:13 +0100

I need to get keyboard focus without my app becoming active.

Here's why: I've got this third-party media app that shows content in fullscreen. My app is meant to be an alternate front-end to that app, offering (in my view) better controls for play/pause/ff, that kind of thing.

So my app puts up a control panel in front of the media apps content window (using a hotkey). When my panel is up, I want it to have keyboard focus. I tried doing this by forcing my app active, using this technique from Daniel Jalkut:

<http://www.cocoabuilder.com/archive/message/cocoa/2005/11/5/149489>

However, forcing my app active causes the media up to come out of fullscreen mode. That makes some sense, I guess, but doesn't help me. I've made my app a background app (LSUIElement) with a menu in a status item (NSStatusItem).

Quicksilver does exactly what I want. When the media app is in fullscreen, I bring up Quicksilver's panel, type away and dismiss it without disturbing the media app at all. Does anybody know how Quicksilver (and similar apps) does this?

Regards,
i.

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: bound NSTextfield won't update unless clicked on
  • Next by Date: Re: [newbie]How to pop a window?
  • Previous by thread: Re: iPhoto integration?
  • Next by thread: Out-of-order Undos and NSTextField
  • Index(es):
    • Date
    • Thread