View Full Version : Show application keyboard shortcut.
MacDonaldsd
Feb 8, 2008, 10:00 AM
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.
kainjow
Feb 8, 2008, 12:52 PM
Check out PTHotKeysLib (http://rogueamoeba.com/sources/HotKeysLib3.zip)
MacDonaldsd
Feb 8, 2008, 02:48 PM
Is there any documentation for this kainjow ?
kainjow
Feb 8, 2008, 02:58 PM
I don't think anything public beyond the test project included.
MacDonaldsd
Feb 8, 2008, 03:03 PM
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
Feb 8, 2008, 03:06 PM
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
Feb 9, 2008, 02:58 PM
If that doesn't work out, look up RegisterEventHotKey() in the API docs.
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.