Ramakrishna
Ramakrishna

Reputation: 686

"Next" button on Android Numeric keypad

I am wondering about how to detect "Next" button event on android numeric keypad using Jquery. Please give me solution how to trigger that button event.

Upvotes: 3

Views: 3176

Answers (1)

Rum Jeremy
Rum Jeremy

Reputation: 500

You can detect the next keyboard press by using the following bind in JQuery:

$('input').on('keydown', function(e){
    if(e.which === 9) {
        //your code here
    }
});

The 'next' button emulates the tab keypress event on a keyboard, which is key code 9. Unfortunately, keypress and keyup events do not detect the next key event, so you need to bind it on keydown.

Upvotes: 7

Related Questions