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
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
- Bitcoin (BTC): 3H9fLhG57rFffUcHKxgZjvgPhjyNJkuRf4
- Ethereum (ETH): 0xf0e7cf37e7341ad766b43849e14a101d59b133a0