node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

crtrdg-keyboard

crtrdg keyboard

keyboard listener module for crtrdg

Install

npm install --save crtrdg-keyboard

API

createKeyboard

Create the keyboard object.

Examples

var createKeyboard = require('crtrdg-keyboard')
var keyboard = createKeyboard()

keyboard#keydown

keydown event

Parameters

  • keyCode String

Examples

keyboard.on('keydown', function (key) {
  console.log(key)
})

keyboard#keyup

keyup event

Parameters

  • keyCode String

Examples

keyboard.on('keyup', function (key) {
  console.log(key)
})

Contributing

  • Fork this repository.
  • Create a branch for you changes.
  • Include tests if applicable.
  • Add/edit documentation for any changes.
  • Submit a pull request.

License

MIT