Languages

Menu
Sites
Language
Bug: Simulator remote's KeyboardEvent missing key property

 

When pressing buttons on the simulator's remote, the KeyboardEvent is missing the key and code properties. These are implemented since Chrome 51 and 48 respectivelty. Consequently any modern code in event listeners depending on these proprties instead of the deprecated `keyCode` will not react to `keydown` events.

Unlike the simulator, the emulator's remote does populate these properties, as well as the deprecated keyCode.

https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key

https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code

Edited by: BC on 18 Dec, 2024