# is-key

> determine if an event is a key

Latest version **1.0.2** (published 2015-05-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install is-key
pnpm add is-key
yarn add is-key
bun add is-key
```

## 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.2 |
| Published | 2015-05-14 |
| First published | 2014-11-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Ben McMahen |
| Maintainers | bmcmahen |
| Keywords | keyname, keypress, keydown |

## Links

- npm: https://www.npmjs.com/package/is-key
- Repository: https://github.com/bmcmahen/is-key
- Issues: https://github.com/bmcmahen/is-key/issues
- npm.io page: https://npm.io/package/is-key

## Dependencies (1)

- [yields-keycode](https://npm.io/package/yields-keycode.md) ^1.1.0

## Recent versions

- 1.0.2 (latest) — 2015-05-14
- 1.0.1 — 2014-11-17

## README

# is-key

  Determine if a particular key was pressed in an event handler

## Installation

  Install with NPM, Component, or Duo:

    $ npm install bmcmahen/is-key


## Usage

```javascript
var key = require('is-key');
var isArrow = key('left', 'right', 'up', 'down');
el.onkeyup = function (e) {
  if (isArrow(e)) {
    // arrow key pressed
  }
};
```


## License

  MIT

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