# simple-hotkeys

> Simple hotkeys for tower.im

Latest version **1.0.3** (published 2015-05-20) · 0 weekly downloads

## Install

```sh
npm install simple-hotkeys
pnpm add simple-hotkeys
yarn add simple-hotkeys
bun add simple-hotkeys
```

## 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.3 |
| Published | 2015-05-20 |
| First published | 2015-02-23 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+4 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 3 |
| Author | ichord |
| Maintainers | farthinker |
| Keywords | hotkeys |

## Links

- npm: https://www.npmjs.com/package/simple-hotkeys
- Repository: https://github.com/ichord/simple-hotkeys
- Issues: https://github.com/ichord/simple-hotkeys/issues
- npm.io page: https://npm.io/package/simple-hotkeys

## Dependencies (2)

- [jquery](https://npm.io/package/jquery.md) 2.x
- [simple-module](https://npm.io/package/simple-module.md) ~2.0.5

## Recent versions

- 1.0.3 (latest) — 2015-05-20
- 1.0.2 — 2015-05-19
- 1.0.1 — 2015-04-28
- 1.0.0 — 2015-02-23
- 0.2.0 — 2015-02-23

## README

simple-hotkeys
=============

### Options

* el - jQuery selector / jQuery Object / Node;

If you want to bind hotkeys to dynamic adding element, please pass a selector as `el`.  
If the `el` is null or doesn't exist, `document` element would be used by default.

### Api

* add(shortcut, callback(e)) - add a hotkey.
* remove(shortcut) - remove a hotkey
* destroy() - off events and clean up.

### Usage

```javascript
hotkeys = simple.hotkeys();
hotkeys.add("ctrl + b", function(e){
    console.log("ctrl + b pressed");
}).add("ctrl + h"], function(e){
    console.log("Help");
});
```

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