0.12.1 • Published 6 years ago

dingus v0.12.1

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

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

0.12.1

6 years ago

0.12.0

6 years ago

0.11.1

6 years ago

0.11.0

6 years ago

0.10.0

6 years ago

0.9.0

6 years ago