Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > RegisterEventHotKey

RegisterEventHotKey
Thread Tools
parallax
Admin Emeritus
Join Date: Oct 2000
Location: Boston, MA
Status: Offline
Reply With Quote
Mar 31, 2002, 12:10 AM
 
Can someone give sample parameter values for RegisterEventHotKey()?

I'm trying to use hotkeys in my cocoa app (running a carbon loop in another thread) but I'm getting paramErrs for this call. Help!
"Against stupidity, the gods themselves contend in vain" (Schiller)
     
Angus_D
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Mar 31, 2002, 06:07 AM
 
I don't think you can from Cocoa... I'm pretty sure someone said you can't, but I haven't tried it myself.
     
parallax  (op)
Admin Emeritus
Join Date: Oct 2000
Location: Boston, MA
Status: Offline
Reply With Quote
Mar 31, 2002, 11:39 AM
 
Well, I tried it, and it seemed to work to some degree, but I don't know how to capture the hotkey event. When I put in some bad pointers and type in the hotkey the program crashes (so I assume its receiving the hotkey), but I'm not sure which EventTypeSpec to use to capture it properly.
"Against stupidity, the gods themselves contend in vain" (Schiller)
     
parallax  (op)
Admin Emeritus
Join Date: Oct 2000
Location: Boston, MA
Status: Offline
Reply With Quote
Mar 31, 2002, 12:03 PM
 
lol, nevermind. kEventHotKeyPressed, Heh, that helps.

Anyway, for those of you that want to use HotKeys in Cocoa, it is possible using Carbon Events (setting up a Carbon event loop). I'll release the code in some wrapper so you all can use it easily.
"Against stupidity, the gods themselves contend in vain" (Schiller)
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 01:09 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,