https://github.com/codeocelot/keycodes
A collection of key code mappings
https://github.com/codeocelot/keycodes
Last synced: about 2 months ago
JSON representation
A collection of key code mappings
- Host: GitHub
- URL: https://github.com/codeocelot/keycodes
- Owner: codeocelot
- License: apache-2.0
- Created: 2016-01-04T23:25:38.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-01-05T00:28:01.000Z (over 10 years ago)
- Last Synced: 2025-10-05T15:14:16.602Z (6 months ago)
- Language: JavaScript
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# keycodes
A collection of key code mappings
## How to use
`npm install --save key_codes`
var keys = require('key_codes');
switch(evt.keyCode){
case keys.a:
console.log('Got an a');
break;
case keys.enter:
console.log('Got an enter');
break;
}
## FAQ
### Where's a full listing of the keycodes?
See source for a full list of keycodes.