Keyboard handling.
Listens for pressing a given key. downCallback and upCallback are executed during
onkeydown
and onkeyup
events. obj is the element which should handle these events;
defaults to document
. group is a arbitrary string - one can then enable/disable groups of keyboard shortcuts.
id is not used yet.
var key = "ctrl-alt-7"; var callback = function() { alert('Pressed!'); } OAT.Keyboard.add(key, callback, false, "mygroup", false, false);
Disables all shortcuts, containing into group.
Enables all shortcuts, containing into group.