Open jcubic opened 7 years ago
the fix is to use String.fromCharCode(e.which)
or charCode for keypress,
The key property need to check if the event type is keypress or keydown/up.
If the polyfill don't support keypress then it should return undefined for keypress.
I needed to test my project in old Chrome so I've installed Ubuntu 12.04 with chromium 37 that don't have key event property so I needed to use the ployfill and it show wrong keys for keypress:
key z result "F11" key x result "F9" key q result "F2" key w result "F8" key s result "F4" key r result "F3" key t result "F5" key y result "F10" key u result "F6" key p result "F1" key v result "F7" key , result "printScreen" key . result "delete" key ' result "arrowright" key [ result "OS" key ] result "contextMenu"
didn't test with shift.