# surecut

> Bind keyboard shortcuts to tasks

Latest version **1.0.0** (published 2020-03-24) · ISC license · 0 weekly downloads

## Install

```sh
npm install surecut
pnpm add surecut
yarn add surecut
bun add surecut
```

## 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 | 2020-03-24 |
| First published | 2020-03-24 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 8.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | saint MiM |
| Maintainers | saintmim |
| Keywords | shortcut, keyboard, key, js, javascript |

## Links

- npm: https://www.npmjs.com/package/surecut
- Repository: https://github.com/mobayen/sureCuts
- Homepage: https://github.com/mobayen/sureCuts#readme
- Issues: https://github.com/mobayen/sureCuts/issues
- npm.io page: https://npm.io/package/surecut

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.0.0 (latest) — 2020-03-24

## README

# Usage

## Example
```javascript
require('./bootstrap');

const aClass = require('Surecut');

let a = new aClass();
a.initial({ activationKeys: ['/', '/', 'a']})
    .target('.add_class_red')
    .addClass('red');

let b = new aClass();
b.initial({ activationKeys: ['/', '/', 'b']})
    .target('#focus_on_me')
    .focus();

let d = new aClass();
d.initial({ activationKeys: ['/', '/', 'd']})
    .target('#clickme')
    .click();
```

And then hit '/' + '/' + ('a' or 'c' or 'd')

## The shortcut key/character
The default key to trigger is slash (actually double slash), but can get bind to other list of characters
You can specify either a character (eg: "/") or key-code (eg: 191)
```
[191, 191, 65]
```

# Options
it can customized by passing the object of options to the `initial()` method

The 'activation_key' can accept either keyCodes (eg: 191 slash (/)) or the key (the character) itself (eg: '/')
```javascript

c.initial({activationKeys: [191, 191, 65], gapTime: 500})
    .addClass('red', 'target');
```

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