jquery Hotkeys - enabling a combination while INSIDE a input/textarea

Posted by TheExit on Stack Overflow See other posts from Stack Overflow or by TheExit
Published on 2011-02-11T23:24:34Z Indexed on 2011/02/11 23:25 UTC
Read the original article Hit count: 175

Filed under:
|
|

Hello,

I'm using the jQuery hotkeys plugin here: https://github.com/tzuryby/jquery.hotkeys

The plugin prevents hot keys from firing when you are inside an input field.

In my case, I want a hotkey to fire when inside an input box, not all but one in particular:

$(function() {
    $(document).bind('keydown', 'Shift+return',function (evt) {
        alert('got it')
    });
});

Any ideas on how jQuery Hotkeys can be patched to allow for shift+return to be fired when inside an input/textarea field? but not fired for all the other hotkey bindings?

Thanks

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about jquery-plugins