I'm trying to make a webapp with hotkeys that work the same for all keyboard layouts. I've done it before with other languages, but I haven't been able to find a way with Javascript. I can only get the character of the key that was pressed, not the key independent of keyboard layout.
In the MDN Doc for "keydown", keycode looked promising, but it was not.
Is there a way to get the key pressed rather than the character?
The best solution I can think of without this is a user layout translation option hidden somewhere in settings, which is fine too.
You won't be able to retrieve this information directly from browser APIs. One possibility would be to use a plugin like Layoutline (demo) which could be a prerequisite step for users of your application.