# redux-shortcuts

> Keyboard shortcuts in Redux

Latest version **0.0.3** (published 2016-08-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install redux-shortcuts
pnpm add redux-shortcuts
yarn add redux-shortcuts
bun add redux-shortcuts
```

## Health

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

Positive: has types package; no vulnerabilities.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2016-08-17 |
| First published | 2015-12-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/redux-shortcuts) |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Kengo Nakatsuka |
| Maintainers | nak2k |
| Keywords | redux, shortcut |

## Links

- npm: https://www.npmjs.com/package/redux-shortcuts
- Repository: https://github.com/nak2k/node-redux-shortcuts
- Issues: https://github.com/nak2k/node-redux-shortcuts/issues
- npm.io page: https://npm.io/package/redux-shortcuts

## Dependencies (1)

- [mousetrap](https://npm.io/package/mousetrap.md) ^1.6.0

## Recent versions

- 0.0.3 (latest) — 2016-08-17
- 0.0.2 — 2016-06-09
- 0.0.1 — 2015-12-05

## README

# redux-shortcuts

Keyboard shortcuts in Redux.

## Example

```js
import {
  bindShortcuts,
  mousetrap,
  Mousetrap,
} from 'redux-shortcuts';
import {
  myActionCreator,
  myActionCreator2,
} from './actions';

bindShortcuts(
  [['command+a', 'ctrl+a'], myActionCreator],
  [['command+b', 'ctrl+b'], myActionCreator2],

  // Dispatch multiple actions
  [['command+c', 'ctrl+c'], [myActionCreator, myActionCreator2]],

  // Dispatch and prevent default behavior
  [['command+s', 'ctrl+s'], myActionCreator, true]
)(store.dispatch);

//
// This package exports an instance of Mousetrap.
// So the stopCallback of it can be overwritten.
//
mousetrap.stopCallback = (e, element, combo, sequence) => {
  // Do something.

  // And call the default implementation if you need.
  return Mousetrap.stopCallback(e, element, combo, sequence);
};
```

See also [Mousetrap](https://craig.is/killing/mice) to define keyboard commands.

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