# parse-key

> Parses strings into key objects of the same format as the ones emitted by nodejs readline.

Latest version **0.2.1** (published 2013-02-02) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.1 |
| Published | 2013-02-02 |
| First published | 2013-01-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/parse-key) |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 13 |
| Author | Thorsten Lorenz |
| Maintainers | thlorenz |
| Keywords | readline, string, print, convert |

## Links

- npm: https://www.npmjs.com/package/parse-key
- Repository: https://github.com/thlorenz/parse-key
- npm.io page: https://npm.io/package/parse-key

## Alternatives

- [localforage](https://npm.io/package/localforage.md) — 6.2M weekly downloads
- [localforage-observable](https://npm.io/package/localforage-observable.md) — 30.8K weekly downloads
- [@y/y](https://npm.io/package/@y/y.md) — 30.1K weekly downloads
- [@metaobjectsdev/render](https://npm.io/package/@metaobjectsdev/render.md) — 3.5K weekly downloads
- [@ledgerhq/coin-algorand](https://npm.io/package/@ledgerhq/coin-algorand.md) — 1.1K weekly downloads

## Recent versions

- 0.2.1 (latest) — 2013-02-02
- 0.2.0 — 2013-02-02
- 0.1.1 — 2013-01-25
- 0.1.0 — 2013-01-22

## README

# parse-key [![build status](https://secure.travis-ci.org/thlorenz/parse-key.png)](http://next.travis-ci.org/thlorenz/parse-key)

Parses strings into key objects of the same format as the ones emitted by [nodejs readline](http://nodejs.org/api/readline.html).

Counter part to [stringify-key](https://github.com/thlorenz/stringify-key).

## Installation

    npm i parse-key

## Usage

```js
var parse = require('parse-key');

parse('ctrl-c')       // returns { name: 'c', ctrl: true, meta: false, shift: false, alt: false, sequence: '\u0003' }

parse('shift-ctrl-c') // returns { name: 'c', ctrl: true, meta: false, shift: true, alt: false, sequence: '\u0003' }

parse('alt-c')        // returns { name: 'c', ctrl: false, meta: false, shift: false, alt: true, sequence: 'c' }
```

## Caveats

For completeness' sake, the `alt` modifier is parsed and included with the returned `key` although the nodejs readline does not
include it in its `key` object nor does it have any effect when the key is emitted.

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