Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

MacDonaldsd

macrumors 65816
Original poster
Sep 8, 2005
1,005
0
London , UK
How can I get my application to become the key window by using a keyboard shortcut, when a user is using any application.

All the documentation I have found seems to be when the user is using the application already, but this isn't what I am looking for.
 

MacDonaldsd

macrumors 65816
Original poster
Sep 8, 2005
1,005
0
London , UK
OK thanks.

I don't think that will solve my actually problem will it ?

What I mean is something like expose, spotlight, quicksilver etc

Whatever application you are in, you press the short cut and that application comes to the front
 

kainjow

Moderator emeritus
Jun 15, 2000
7,958
7
Yes it should work. I used it in a product a few years back to allow the user to perform an action in my program with a shortcut no matter what program they were in. Basically you would just use NSWorkspace's activateIgnoringOtherApps: method to make your app the frontmost app when the shortcut is used.
 

iSee

macrumors 68040
Oct 25, 2004
3,540
272
If that doesn't work out, look up RegisterEventHotKey() in the API docs.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.