Skip to content Skip to sidebar Skip to footer

What Is The Keycode For "Next" In Android VirtualKeyBoard

I am enhancing (in an angular directive) the google places autocomplete input to select the first option if none is selected. I am using the below code, which works like a charm wh

Solution 1:

Can you try to set a minimal page with this code and see if it prints the right value?

document.body.addEventListener("keyup", function(event) {
   console.log(event.key);
   console.log(event.code);
});

Or, even easier, you can get keycodes using this website:
https://keycode.info

The tab key data for my Samsung S10e, as returned by https://keycode.info:

event.key = Unidentified
event.location = 0
event.which = 229
event.code = 

Solution 2:

As pointed out already, the value for e.which / e.keyCode is going to be 229 and e.key is going to be 'Unidentified'. You can check that using https://keyjs.dev, where you will also find an explanation about virtual/mobile keyboards:

When using virtual/mobile keyboards, formally know as IME (Input-Method Editor), the W3C standard states that a KeyboardEvent's e.keyCode should be 229 and e.key should be "Unidentified".

The best option on mobile is probably just adding an expand/down arrow to the dropdown and let users open it manually if they want to.


Post a Comment for "What Is The Keycode For "Next" In Android VirtualKeyBoard"