[frontend][html] Fixes keyboard support

Keyboard support was very buggy because it relied on `event.keyCode`. The keycode depends on the keyboard layout.

I changed this behaviour to use `event.key` instead. This variable contains the char produced by the keyboard event or the keyname. It's much more reliable.
Fixed :-)