Open thib3113 opened 1 year ago
Hello, about this line : https://github.com/joelnet/konami-code-react-component/blob/f72d2480b53226e71740a8f532527f46d1c7bbd5/src/SecretCode/useInputEvent.js#L7
the problem here, will be that will not work on some keyboard . An example with an azerty Keyboard : If I press "a" :
{ "altKey": false, "charCode": 0, "code": "KeyQ", "ctrlKey": false, "key": "a", "keyCode": 65, "which": 65 }
event.code will pass the code of the physical key, and not the real key pressed
Ahh that is good to know. I assumed all keypresses were handled with a code. Do you want to submit a pull request?
Done, but maybe you will need to update your blog post too :) .
Hello, about this line : https://github.com/joelnet/konami-code-react-component/blob/f72d2480b53226e71740a8f532527f46d1c7bbd5/src/SecretCode/useInputEvent.js#L7
the problem here, will be that will not work on some keyboard . An example with an azerty Keyboard : If I press "a" :
event.code will pass the code of the physical key, and not the real key pressed