tzuryby / jquery.hotkeys

jquery.hotkeys plugin lets you easily add and remove handlers for keyboard events anywhere in your code supporting almost any key combination. It takes one line of code to bind/unbind a hot key combination
http://code.google.com/p/js-hotkeys/
789 stars 649 forks source link

Some keys don't work. #3

Open ieure opened 14 years ago

ieure commented 14 years ago

This code doesn't work, because the punctuation keys to the right of the numerics above the QWERTY can't be bound:

chars = ['-', '_', 'shift+=', '+'];
for (i in chars) {
    var this_char = chars[i];
    $(document).bind('keyup', chars[i], function(event) {
        console.debug("Pressed " + this_char);
    });
}
tuzemec commented 14 years ago

I think some of specialKeys mappings are messed up. For example - in the current code "." is mapped to 110, but in fact it's 190.