Keypress keycode mismatch in Windows and Mac


Hi Jules,
When Ctrl + Shift + ‘>’ is pressed.
In windows we get keycode as 46(which represents ‘.’) but in Mac we get keycode as 62(which represents ‘>’).

Even if i do uppercase or lowercase result is same…

Basically my requirement is i need to handle 'Ctrl + Shift + >", should i put the “or” condition for ‘.’ and ‘>’ so that it will work in PC as well as in Mac. or is there any other way …


Remember that this isn’t just a mac/pc difference, people will inevitably have different, weird keyboards with strange layouts. There’s no way that every keyboard in the world will have ‘.’ and ‘<’ on the same key.

I think the best policy is to avoid hard-wiring “difficult” keypresses like this, and stick to number and letter keys. But let the user select their own keypresses if they want to, because they’ll be doing that on the keyboard they’re actually using, so whatever they pick will always work.