View on GitHub

keycuts

A modern keyboard event library for managing keyboard shortcuts.

Introduction

keycuts is a modern Javascript library for handling keyboard shortcuts. It supports listening for key combinations, key sequences and a mix of both. keycuts has no external dependencies and a small footprint (~8kb, gzipped ~3kb).

Demo

An example of what keycuts can do for you can be found on the demo site.

Getting Started

Coming soon …

Bind Shortcuts

Coming soon …

Watchers

Coming soon …

Options

Coming soon …

API Reference

Link to the API reference

FAQ

Why another Javascript keyboard library?

The existing keyboard shortcut libraries I have found all use the now deprecated charCode and keyCode attributes of KeyboardEvent. keycuts uses the newer key and code attributes instead. It also adds features not found in the other libraries.

What browsers are supported?

By using the above mentioned newer (and not deprecated) key and code attributes of KeyboardEvend keycuts only supports modern browser (especially IE >= 11). If you need to support older browsers then keycuts is not for you and you have to look somewhere else (e.g. Hotkeys, Keypress, keymaster.js, Mousetrap, KeyboardJS).

What keys are supported?

keycuts is completely key agnostic. All printable keys and all non printable keys listed in the MDN web docs are supported. The naming schema of the non printable keys is the key value stated in the MDN web docs, except for the space key (‘ ‘ in the MDN docs) which is named Space in keycuts (just better visible in a shortcut).

Under what license is keycuts published?

The very liberal MIT license.

Can I support this library somehow? Absolutely! If you are a writer by improving the documentation. If you are a coder by fixing bugs and writing tests. If you are a creative mind by suggesting features. If you are damn rich by donating money or even better BTC / ETH (see Donations).

Donations

License

MIT © Kai Schlamp