keyUp is not supported on Android Chrome due to using a virtual keyboard. e.key
will always be Undefined
, and e.keyCode
will always be 229 no matter which key you use. This feature is depreciated https://developer.mozilla.org/en-US/docs/Web/API/Element/keypress_event .
I want to know which key a user has done “keyUp” on last. What I have seen as proposed solutions are hacks, for example, if a user is using a textarea, just get the last character of the textarea target value. But these are not true solutions, if a user is editing the middle of a paragraph in a textarea, then this method will not work.
In modern Android Chrome browsers, what is the preferred way of getting a keyUp event?