Skip navigation.
 
mlStealing keyboard focus without activating
FROM : Ingvar Nedrebo
DATE : Sat Jul 08 16:39:13 2006

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.

Related mailsAuthorDate
No related mails found.