@koding/shortcuts

0.6.0 • Public • Published

shortcuts

manages keyboard shortcuts in browser.

# usage

var shortcuts = new Shortcuts({
  foo: [
    { name: 'bar', binding: [ ['ctrl+x'], ['command+x'] ]}
  ]
});
shorcuts.on('key:foo', function () { })

See keyconfig for spec.

api

# ctor(defaults={})

Returns an events.EventEmitter.

.get(collectionName, modelName)

.update(collectionName, modelName, value, silent)

.getCollisions(collectionName)

events

key:collectionName

change

todo

  • do not use mousetrap

license

mit

Readme

Keywords

none

Package Sidebar

Install

npm i @koding/shortcuts

Weekly Downloads

0

Version

0.6.0

License

MIT

Last publish

Collaborators

  • usirin
  • koding