You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I press the question mark key '?' on the a keyboard (for different layouts, such as US English or Spanish), I never get the KeyEvent::KEY_QUESTION code, but a different one.
For a US English layout, I get this: Got key: '?' code: 47 native: 191 translated: 47 -- this is '/', which is the unshifted key I'm pressing.
For a Spanish keyboard layout, I get this: Got key: '?' code: 91 native: 219 translated: 91 -- this is '[', which is not the unshifted key; you would have ''' (apostrophe) on a Spanish keyboard as the unshifted '?' key.
The actual KeyEvent::KEY_QUESTION value is 63, which is also the ASCII value of '?'. But I never see that value as the "Cinder key code". I know I can (and do) just test the getChar() value, but it would be nice to be able to just use a single switch statement on the KeyEvent codes. I can't check event.isShiftDown() plus a different code in a compatible way, since the code is different for different layouts.
The text was updated successfully, but these errors were encountered:
When I press the question mark key '?' on the a keyboard (for different layouts, such as US English or Spanish), I never get the
KeyEvent::KEY_QUESTION
code, but a different one.For example, in my
keyDown()
handler:For a US English layout, I get this:
Got key: '?' code: 47 native: 191 translated: 47
-- this is '/', which is the unshifted key I'm pressing.For a Spanish keyboard layout, I get this:
Got key: '?' code: 91 native: 219 translated: 91
-- this is '[', which is not the unshifted key; you would have ''' (apostrophe) on a Spanish keyboard as the unshifted '?' key.The actual
KeyEvent::KEY_QUESTION
value is 63, which is also the ASCII value of '?'. But I never see that value as the "Cinder key code". I know I can (and do) just test thegetChar()
value, but it would be nice to be able to just use a singleswitch
statement on the KeyEvent codes. I can't checkevent.isShiftDown()
plus a different code in a compatible way, since the code is different for different layouts.The text was updated successfully, but these errors were encountered: