Processing keyboard events in Mac Carbon application....

Blesi

Registered
Hello,

I am trying to process key input in my Carbon application.

I am receiving keyboard event and I am extracting the pressed keyCode with:

GetEventParameter (event, kEventParamKeyCode, typeUInt32, NULL, sizeof(UInt32), NULL, &keyCode);

The problem is, I can't find anywhere in documentation or header files which value will be returned in keyCode when I press different keys.

I searched through Apple source code and the only thing I found was in Carbon CGL example where some 'magic' values are used like this:

kUpArrow = 0x7E,
kDownArrow = 0x7D,
kLeftArrow = 0x7C,
kRightArrow = 0x7B,
kMinus = 0x1B,
kPlus = 0x18,
kH = 0x04,
kC = 0x08

Does anybody knows where those values come from?
Can anybody point me in some direction where I can find more information.
Any help would be appreciated.

Thanks.
 
Back
Top