# react-usekeyboardevent

> Listener of keyboard keys

Latest version **1.0.2** (published 2021-04-21) · ISC license · 0 weekly downloads

## Install

```sh
npm install react-usekeyboardevent
pnpm add react-usekeyboardevent
yarn add react-usekeyboardevent
bun add react-usekeyboardevent
```

## Health

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

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

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2021-04-21 |
| First published | 2021-04-21 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 1.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Dydydia |
| Maintainers | dydydia |

## Links

- npm: https://www.npmjs.com/package/react-usekeyboardevent
- Repository: https://github.com/boulinb/react-usekeyboard
- Homepage: https://github.com/boulinb/react-usekeyboard#readme
- Issues: https://github.com/boulinb/react-usekeyboard/issues
- npm.io page: https://npm.io/package/react-usekeyboardevent

## Recent versions

- 1.0.2 (latest) — 2021-04-21
- 1.0.1 — 2021-04-21
- 1.0.0 — 2021-04-21

## README

# UseKeyboardEvent

##### Listener of keyboard keys

### Installation

```npm i react-usekeyboardevent```
or
```yarn add react-usekeyboardevent```

### Basic Usage

```sh
import {useKeyboardEvent} from 'react-usekeyboardevent';

function App() {

  useKeyboardEvent((event) => {
    console.log(event);
  }, "keydown");

  return (
    <div className="App">
      ...
    </div>
  );
}

export default App;
```

### Parameters

| Argument | Value |
| ------ | ------ |
| Function | (event) => void |
| String | "keyup" \| "keydown" \| "keypress" |

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