I have an NSEvent and I use the keyCode. This is a hardware specific scan code for the physical location of the key. For OS X I don't see any sane way to convert this scan code into a virtual key code, which is the meaning of the scan code given the users keyboard layout (QWERTY, AZERTY, etc). Eg, Windows has MapVirtualKey to convert a scan code to a virtual key code. I can't find a way to do it in OS X, so unfortunately I can't fix it there.