npm

npm’s 2019 JavaScript ecosystem survey analysis is now available! Get your copy here »

crtrdg-keyboard

1.0.1 • Public • Published

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

install

npm i crtrdg-keyboard

Downloadsweekly downloads

5

version

1.0.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability