Skip to content

jkup/shortcut

Repository files navigation

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

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.

About

📖 A keyboard shortcut library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published