keyname

Keyboard event key name utility

npm install keyname
2 downloads in the last week
4 downloads in the last month

keyname

Keyboard event key name utility

Installation

$ component install component/keyname

or

$ npm install keyname

API

var keyname = require('keyname');

keyname(27);
// => "esc"

keyname(23123123);
// => undefined

Keys

The following are supported:

  • backspace
  • tab
  • enter
  • shift
  • ctrl
  • alt
  • capslock
  • esc
  • space
  • pageup
  • pagedown
  • end
  • home
  • left
  • up
  • right
  • down
  • ins
  • del
  • meta

License

MIT

npm loves you