Skip to content
keyboard module designed for crtrdg.js
JavaScript
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
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

Something went wrong with that request. Please try again.