spmjs

spm@3.x

Brand new static package manager for browser.

Getting Started 󰅴 Packages

simple-hotkeys


Simple hotkeys for tower.im

spm install simple-hotkeys
Versions 1.0.3
Updated 9 years ago
Keywords hotkeys
Homepage https://github.com/ichord/simple-hotkeys
Repository git://github.com/ichord/simple-hotkeys.git
Dependencies jquery, simple-module
Main lib/hotkeys.js
Owner

simple-hotkeys

Options

If you want to bind hotkeys to dynamic adding element, please pass a selector as el.
If the el is null or doesn't exist, document element would be used by default.

Api

Usage

hotkeys = simple.hotkeys();
hotkeys.add("ctrl + b", function(e){
    console.log("ctrl + b pressed");
}).add("ctrl + h"], function(e){
    console.log("Help");
});