keyboard module designed for crtrdg.js
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
example.js
index.js
package.json
readme.md

readme.md

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