# uc-keys

> Hotkeys detection & defenition

Latest version **1.0.0** (published 2018-09-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install uc-keys
pnpm add uc-keys
yarn add uc-keys
bun add uc-keys
```

## 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.0 |
| Published | 2018-09-09 |
| First published | 2018-09-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Alexey Novikov |
| Maintainers | velocityzen |
| Keywords | unchained, ui, browser, keys, hotkey, kiss |

## Links

- npm: https://www.npmjs.com/package/uc-keys
- Repository: https://github.com/unchainedui/keys
- Homepage: https://github.com/unchainedui/keys#readme
- Issues: https://github.com/unchainedui/keys/issues
- npm.io page: https://npm.io/package/uc-keys

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2018-09-09

## README

# Unchained UI

## Keys

[![NPM Version](https://img.shields.io/npm/v/uc-keys.svg?style=flat-square)](https://www.npmjs.com/package/uc-keys)
[![NPM Downloads](https://img.shields.io/npm/dt/uc-keys.svg?style=flat-square)](https://www.npmjs.com/package/uc-keys)

Hotkeys detection & defenition

ES module version of [is-hotkey](https://github.com/ianstormtaylor/is-hotkey)

### Usage

```js
import isHotkey from 'uc-keys';

function onKeyDown(e) {
  if (isHotkey('mod+s', e)) {
    ...
  }
}
```

For better perfomance you can curry the hotkey:

```js
import isHotkey from 'uc-keys'
const isSaveHotkey = isHotkey('mod+s')

function onKeyDown(e) {
  if (isSaveHotkey(e)) {
    ...
  }
}
```

License MIT

© Ian Storm Taylor

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