All KeyboardEvent Keys
npm install all-keyboardevent-keys> Note: This library is a work in progress. Checkout the contribution guidelines to see how you can help.
Add with your favorite package manager:
``sh`
npm install --save all-keyboardevent-keysor
yarn add all-keyboardevent-keys
Import the default KEY object, then use:
`jsx`
import KEY from 'all-keyboardevent-keys'
KEY is an object with nearly all available KeyboardEvent keys. You can view the full list available here.
You can access word keys using dot notation:
`js
import { KEY } from 'onkey-event-manager'
KEY.Enter // 'Enter'
KEY.Tab // 'Tab'
`
To access symbols or numbers, use bracket notation:
`js``
KEY[9] // '9'
KEY['\\'] // '\'
Each keyboard has its own set of Keyboardevent keys. It is the goal of this project to gather all keys into a single library.
- en_US 🇺🇸
To add a keyboardevent keys for your keyboard language, please read the contributing guide and make a pull request.
- [ ] zh-Hans 🇨🇳
- [ ] hi 🇮🇳
- [ ] fr_FR 🇫🇷
- [ ] es_ES 🇪🇸
- [ ] en_GB 🇬🇧
- [ ] de_DE 🇩🇪
Don't see your keyboard language? File an issue requesting it.
- Sean McPherson - author, en_US 🇺🇸