I need to know what the keycode is for the clear and the equal key on the numpad.
I've seen different sources explain it, but they all say something different. Can someone give me a definite answer?
Update:
I get the keycodes this way:
NSEvent *result = incomingEvent;
unichar key = result.keyCode;
Which makes the equal sign on the numpad to be 81 and the normal equal sign to be 24.
How do I get the keycodes you are talking about?
The file
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/Headers/Events.h
contains constants for virtual keycodes, in particular
kVK_ANSI_Equal = 0x18
kVK_ANSI_KeypadClear = 0x47
kVK_ANSI_KeypadEquals = 0x51
Since the code for the equal sign is the same that you obtained from NSEvent
these definitions seem to be what you need.