Android 229 Keycode issue : Solved
Hello World,
I was having one weird issue with an Android device and that is key code value is 229 and I wanted to prevent it.
Link:
1. Full Page view - https://codepen.io/parthmakadiya12-the-flexboxer/full/zVEoEG
2. https://stackblitz.com/edit/android-226-input
Open it in Mobile and see codes.
I was having one weird issue with an Android device and that is key code value is 229 and I wanted to prevent it.
- What I wanted to Achieve?
- The numeric keyboard on android device
- The keyboard can only press 0-9 digits no dot or no + - or anything
- limit character to 4 digit
- What is the problem?
- I was using onKeyUp or onKeyDown and more, but I was getting 229 or couldn't get the value at all.
We will use the regex to validate the value and on the basis of value, we will set value.
So let's look at a running example of this:
Link:
1. Full Page view - https://codepen.io/parthmakadiya12-the-flexboxer/full/zVEoEG
2. https://stackblitz.com/edit/android-226-input
Open it in Mobile and see codes.
Comments
Romantic Valentines Day Ideas
Valentine’s day gifts for him
Valentines Day Ideas
Valentines Day Date Ideas
Valentine’s day gift