keithamus / jwerty

⌨ Awesome handling of keyboard events
http://keithamus.github.io/jwerty
Other
1.21k stars 108 forks source link

How do I target numpad non-numeric buttons, like dot/delete? #23

Closed tomsseisums closed 11 years ago

tomsseisums commented 12 years ago

Here is the code that I am working with:

$('input').on({
    keydown : function(e)
    {
        if ( jwerty.is('./num-./num-delete/num-dot', e) )
        {
            alert('dot');
            return false;
        }
    }
});

But, it appears to only trigger the alert on the default "dot".

How do I target the numpad one?

keithamus commented 11 years ago

Numpad Dot does not exist. The keycode is 110 (for me check here to confirm it is for you) but it is not in Jwerty. If you want to make a pull request to add it in I'll happily accept it, otherwise I'll get it in sooner or later.