# vkey

> map ev.keyCode to human names

Latest version **1.0.1** (published 2016-12-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install vkey
pnpm add vkey
yarn add vkey
bun add vkey
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2016-12-28 |
| First published | 2013-01-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 82 |
| Author | Chris Dickinson |
| Maintainers | chrisdickinson |
| Keywords | keyCode, keyboard, key, virtual, vkey |

## Links

- npm: https://www.npmjs.com/package/vkey
- Repository: https://github.com/chrisdickinson/vkey
- Homepage: https://github.com/chrisdickinson/vkey#readme
- Issues: https://github.com/chrisdickinson/vkey/issues
- npm.io page: https://npm.io/package/vkey

## Recent versions

- 1.0.1 (latest) — 2016-12-28
- 1.0.0 — 2014-06-13
- 0.0.3 — 2013-12-16
- 0.0.2 — 2013-01-31
- 0.0.1 — 2013-01-31
- 0.0.0 — 2013-01-31

## README

# vkey

virtual `keyCode` to human name mapping. let's team up to quash all of the `keyCode` inconsistencies that we can!

```javascript

var vkey = require('vkey')

document.body.addEventListener('keydown', function(ev) {
  console.log(vkey[ev.keyCode])
}, false)

```

cobbled together from [Benvie's Keyboard](https://github.com/Benvie/Keyboard) and [MDN](https://developer.mozilla.org/en-US/docs/DOM/KeyboardEvent).

## contributing / making life better for everyone

**EASY MODE, Step 0**: Visit [the test page](http://didact.us/vkey/). Go to **Step 2**.

**Step 1**: get the repo and run the test site.

```bash
$ git clone git://github.com/chrisdickinson/vkey.git
$ cd vkey.git
$ npm install --dev .
$ npm start
$ # open localhost:3030

```

**Step 2**: open the site in all the browsers you have at your command!
mash keys! note inconsistencies!

**Step 3**: open an issue with:

1. your operating system
2. the browser + version
3. (as best as you can describe), what kind of keyboard you're using. images welcome! crude drawings of keyboards less welcome, but still a little welcome.
4. what key you pressed
5. what result you expected
6. what result you got

**Step 3, HARD MODE**: open a pull request with all of the above, and a minimally invasive fix!

## deviations thus far

* meta left and right are reduced to `<meta>`, because no one really seems to support it correctly.
* `<unk>` is coerced to `<menu>` on OSX, since it has no idea what that button is (using a dell keyboard.)

# license

MIT

---
_Source: https://npm.io/package/vkey · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
