-
-
Notifications
You must be signed in to change notification settings - Fork 184
Description
We are happily using HtmlUnit 3.4 with Selenium and wanted to get rid of some legacy usage of the deprecated KeyboardEvent.keyCode in our web application.
The most portable replacement would be KeyboardEvent.key, but this is currently not working for arrow keys. For example sendKeys(Keys.UP) on a element yields & in JavaScript for KeyboardEvent.key as opposed to the expected "ArrowUp". & in ASCII is 0x26 which is the corresponding KeyboardEvent.keyCode.
Stating from the implementation the current support for KeyboardEvent.key seems to be limited to printable characters, "Shift", "Enter" and Period (KeyboardEvent.determineKey()).
As KeyboardEvent.key is part of the W3C UI Events standard and is broadly supported by current browsers (caniuse) it would be really nice to have this as well in HtmlUnit.
Mozilla provides a extensive table of common control and special characters in the mdn
Thanks for the continuous support and effort you put into HtmlUnit.