dingus

0.12.1 • Public • Published


dingus

dingus listens to and emits presentation related keyboard events eg. [<-], [->], [space] or the buttons on one of those wireless presenter dinguses.

Usage

var Dingus = require('dingus')
var dingus = new Dingus({ preventDefault: true });

// Listen to specific events (PREV, NEXT, START_STOP, BLANK_SCREEN)
dingus.on(Dingus.PREV, function(event, eventName) {
  // err'body to the left
});

// Or listen to all of them
dingus.on('*', cb);

// remove it again with
dingus.off('*', cb);

function cb(event, eventName) {
  // event.preventDefault() etc, etc
  // eventName === Dingus.PREV etc, etc
}

// remove `keydown` listener from window
dingus.destroy();

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i dingus

Weekly Downloads

1

Version

0.12.1

License

MIT

Last publish

Collaborators

  • mikker