views:

16

answers:

1

I'm using CGEventCreateKeyboardEvent and need to know what value to use for the CGKeyCode. Specifically, I am after the key code for the Command key (either of them will do). The docs give examples: 'z' is 6, shift is 56. There must be a list somewhere?

+1  A: 

Found an answer. See the picture here: http://classicteck.com/rbarticles/mackeyboard.php

Command is 55, shift is 56, caps lock 57, option is 58, control is 59.

invariant