A
A
altkov2020-07-09 23:19:52
JavaScript
altkov, 2020-07-09 23:19:52

How to get information about the pressed key in Yandex Browser for Android in JavaScript?

The script is such that if a key is included in the given form restrictions (only Russian/only English letters and numbers, etc.), then it is entered into the form in a modified format (for example, in upper case). Everything works on a PC and on IOS, but on Android Yandex Browser gives Unidentified for the event.key property, and 229 for event.keyCode and event.which - 229 (for any key). So how to get information about the key on Android in Yandex Browser? I couldn't find any information on this topic in a search.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
altkov, 2020-07-14
@altkov

I did not find an answer to the question, but I decided this way: instead of keydown on android, I used keyup, and if the length of the string changed, then it worked with the last character.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question