Skip to content

component/keyname

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

keyname(65);
// => "a"

keyname(49);
// => "1"

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
  • a-z
  • 0-9

License

MIT

About

Keyboard event key name utility

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •