Re: Eject Key Code
Re: Eject Key Code
- Subject: Re: Eject Key Code
- From: Dave Camp <email@hidden>
- Date: Mon, 26 Jun 2006 16:15:32 -0700
On Jun 26, 2006, at 9:03 AM, Daniel Tse wrote:
Hi All,
I was wondering if someone can tell what the keycode for the Eject
Key is. Similarly, is there any documentation on the keycodes of
all the other non-ASCII keys like Caps Lock, the volume up/down
keys on the standard mac keyboard? I have tried searching Apple/
Developer but didn't find any tables or docs. I even tried using a
key event grabber but the eject key takes precedence and it's not
registered.
The only way to intercept them (i.e. prevent the OS from processing
them) would be to write a kext.
You can receive them by writing some code to hook into the HID
manager (they are filtered before they get to the normal application
event queue). Any application can do this. You have to install event
queues for each button you are interested in. The USB list would be a
good place to ask questions about that. The USB section on the Apple
dev site probably has sample code for this. You can probably find the
HID keycodes for all possible keyboard buttons in the USB HID Class
documentation at <http://www.usb.org>
As someone else mentioned, you can simulate key-presses with
HIDPostSysDefinedKey, and a couple of other APIs.
Dave
---
The path of least resistance, it's not just for electricity any more.
_______________________________________________
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