Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/component/keyname
- Owner: component
- Created: 2012-10-15T22:44:09.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2015-03-28T19:31:06.000Z (almost 10 years ago)
- Last Synced: 2024-12-09T21:19:21.479Z (18 days ago)
- Language: JavaScript
- Size: 121 KB
- Stars: 13
- Watchers: 6
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: Readme.md
- Changelog: History.md
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);
// => undefinedkeyname(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