Jquery and keyboard on android and IOS

Asked

Viewed 155 times

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.

  • 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.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.