Where can I find a list of key codes for use with Cocoa’s NSEvent class?

Here you go. It’s a map of all the virtual key-codes on the US extended keyboard layout, from the old Inside Macintosh: Text. Most of the key codes are still currently, although I suspect that the very newest Apple keyboards—those with media keys—may have changed a few of the function keys.

Note: ISO and non-extended keyboards may have different key codes for some keys. If you have such a keyboard, try Peter Maurer’s Key Codes application. His site is down, so here’s my copy.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)