The hotkeys
plugin enables keyboard navigation and shortcuts. Depends on the jquery.hotkeys plugin.
Expects an object:
each key is the keyboard shortcut (for possible values check the hotkeys plugin)
each value is a function executed in the instance's context, the return value is used as a return value for the event.
Simple example:
"del" : function () { this.remove(); }
By default "up"
, "ctrl+up"
, "shift+up"
, "down"
, "ctrl+down"
, "shift+down"
, "left"
, "ctrl+left"
, "shift+left"
, "right"
, "ctrl+right"
, "shift+right"
, "space"
, "ctrl+space"
, "shift+space"
, "f2"
, "del"
are bound.
To override any of those - just specify your own function, to disable - just set to false
.
Try pressing up
/down
/left
/right
/space
/f2
/del
.
Enable shortcuts on the instance (enabled by default).
Disable shortcuts on the instance.