Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/component/keyname

Keyboard event key name utility
https://github.com/component/keyname

Last synced: 12 days ago
JSON representation

Keyboard event key name utility

Awesome Lists containing this project

README

        

# keyname

Keyboard event key name utility

## Installation

$ component install component/keyname

or

$ npm install keyname

## API

```js
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