Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jkup/shortcut
:book: A keyboard shortcut library
https://github.com/jkup/shortcut
Last synced: 2 days ago
JSON representation
:book: A keyboard shortcut library
- Host: GitHub
- URL: https://github.com/jkup/shortcut
- Owner: jkup
- License: mit
- Created: 2014-12-19T06:02:12.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-05-29T18:03:36.000Z (over 9 years ago)
- Last Synced: 2024-12-07T06:11:42.653Z (14 days ago)
- Language: JavaScript
- Homepage:
- Size: 239 KB
- Stars: 250
- Watchers: 11
- Forks: 26
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- awesome-starred-test - jkup/shortcut - :book: A keyboard shortcut library (JavaScript)
README
[![Build Status](https://travis-ci.org/jkup/shortcut.svg?branch=master)](https://travis-ci.org/jkup/shortcut)
Shortcut.js
========A keyboard shortcut library, shortcut.js listens for common keyboard shortcuts and triggers custom events for you to use.
## Shortcuts and the events they trigger
Shortcut | Event Name
---------|-----------
j | shortcutNextItem
k | shortcutPrevItem
n | shortcutNewItem
o | shortcutOpenItem
/ | shortcutSearchItems
. | shortcutLoadItems
? | shortcutShowHelp## Listening for an event
```js
document.addEventListener('shortcutNextItem', function() {
// your code here
});
```## Installation
With bower
bower install shortcutjs
Or, just stick shortcut.js or shortcut.min.js in your project
## Contributing
Please review our contributing guidelines [here](CONTRIBUTING.md)
## Standardization
Most of the big web applications ( Facebook, Twitter ) have a handy set of keyboard shortcuts but there is no standardization amongst these sites. A shared library such as shortcut.js could help web applications share a common set of keyboard shortcuts.