Keycode detection on AZERTY vs. QWERTY
问题 How can I in JavaScript detect the typing of a question mark on AZERTY keyboard ? On QWERTY keyboard a question mark produces the code 191, but on AZERTY it seems to produce code 188 (comma on QWERTY). Or should I distinguish between both keyboards in JavaScript, but how ? 回答1: The fastest solution I can think of is to compare the key with the actual question mark, so something like this would be a good solution. document.addEventListener('keydown', function(event) { if (event.key && event