views:

49

answers:

2

Hello All

I added shortcut key on my control using jquery.

 $(function() {
      shortcut.add("ctrl+r", function() { SomeFunctionHere(); });

    });

how can i find that this key already added in my control?

+1  A: 

Like this:

if ('ctrl+r' in shortcut.all_shortcuts) {
    //Shortcut exists
}
SLaks
Thanks @@SLaks... it's working fine....
Pankaj
A: 

As far as I know, shortcut.add() is not a jQuery library function.. what are you doing? Try this: http://code.google.com/p/js-hotkeys/

Jasie