1
i am having difficulty capturing which character the user pressed when using smartphone with ANDROID/IPHONE. I use the jquery keyup event, but the answer is always Undefined or 229.
Someone knows how to fix this?
The code I’m using:
$('#campo-valor').on('keyup', function(event) {
console.log(event.which);
}
Add your code so we can better understand the problem.
– leofontes
In the desktop browser normally works the code, but the same code on android (Chrome - Moto G4 Plus) has different behavior not showing the virtual key that was played. I’ve tried events like 'keydown' and 'keypress' and they didn’t work.
– Alexandre Oliveira