ショートカットを追加します。
$.Shortcuts.add({
type: 'down',
mask: 'Ctrl+A',
handler: function() {
debug('Ctrl+A');
}
});
ショートカットへの反応を開始します。
$.Shortcuts.start();
「別の」リストへのショートカットを追加します。
$.Shortcuts.add({
type: 'hold',
mask: 'Shift+Up',
handler: function() {
debug('Shift+Up');
},
list: 'another'
});
「別の」リストを有効にします。
$.Shortcuts.start('another');
Remove a shortcut:
$.Shortcuts.remove({
type: 'hold',
mask: 'Shift+Up',
list: 'another'
});
停止 (イベント ハンドラーのバインドを解除):
$.Shortcuts.stop();
チュートリアル:
http://www.stepanreznikov.com/js-shortcuts/