spmjs

spm@3.x

Brand new static package manager for browser.

Getting Started 󰅴 Packages

simple-hotkeys @1.0.3


Simple hotkeys for tower.im

spm install simple-hotkeys@1.0.3

Version: 1.0.3 ~ stable

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");
});