Need help with shortcut?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

jkup
217 Stars 19 Forks MIT License 19 Commits 3 Opened issues

Description

:book: A keyboard shortcut library

Services available

!
?

Need anything else?

Contributors list

# 54,734
JavaScr...
hapijs
CSS
meta
12 commits
# 653,495
JavaScr...
Ruby
1 commit
# 407,444
HTML
TypeScr...
Webpack
1 commit

Build Status

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</p>

Listening for an event

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

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.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.