When I bind the ? and the / key with javascript
on qwerty keyboard they have the same
keycode (191)
but you have to press shift to do a ?
.
How can I tell which character was pressed on an azerty keyboard (layout shown below), as they're different keys, both require Shift, and I get the same keycode for them in keyup
.:
$(document).keyup(function(event) {
if (event.which === 191) {
action();
}
});
(Original image is "KB France" by Yitscar (English Wikipedia) Michka B (French Wikipedia) Licensed under Creative Commons Attribution-Share Alike 3.0 via Wikimedia Commons - see use in the article linked above.)