10 Best JavaScript Libraries To Create Custom Keyboard Shortcuts

by jQueryScript,

When you're building an accessible web app, it is critical to implement Keyboard Accessibility to ensure that your users have access to information without using a mouse.

The easiest way to implement Keyboard Accessibility on a website is to use a JavaScript keyboard shortcut library, which enables you to bind keyboard shortcuts and key presses to common actions like Navigate between pages, Like/Dislike posts, Rate products, etc.

In this blog post, you will find the 10 best (most downloaded in a year) jQuery plugins and Vanilla JavaScript libraries that make it easy to trigger any actions on the page by keyboard combinations or keypresses.

Originally Published Dec 23 2020, updated Oct 29 2021

Table Of Contents:

jQuery Keyboard Shortcut Plugins

Add Custom Keyboard Shortcuts To Webpage - keymap.js

A simple yet powerful jQuery plugin for capturing keyboard events and binding custom hotkeys and/or cheat codes to your webpage.

Add Custom Keyboard Shortcuts To Webpage - keymap.js

[Demo] [Download]


jQuery Plugin For Adding Keyboard Shortcuts To Webpage - keyboardShortcut

keyboardShortcut is a jQuery plugin used for creating custom keyboard shortcuts that give your users a quick way to control your web application without using a mouse.

jQuery Plugin For Adding Keyboard Shortcuts To Webpage - keyboardShortcut

[Demo] [Download]


jQuery Plugin For Handling Keyboard Shortcut Events

A jQuery plugin that allows the user to bind keyboard shortcut events to any element and when a key combination is pressed, an event is triggered following that keyboard shortcut.

jQuery Plugin For Handling Keyboard Shortcut Events

[Demo] [Download]


Keyboard Shortcut Handling Plugin - jQuery ShortcutKeys

A super tiny and easy-to-use jQuery plugin for handling keyboard shortcuts on the webpage. Supports both key names and key codes.

Keyboard Shortcut Handling Plugin - jQuery ShortcutKeys

[Demo] [Download]


jQuery Plugin To Enable Custom Shortcuts On Your Website - Hotkey Event

Hotkey Event is a cross-platform jQuery plugin for defining (combo) keyboard shortcuts such as 'CONTROL+ALT+PLUS' and binding an event with it.

jQuery Plugin To Enable Custom Shortcuts On Your Website - Hotkey Event

[Demo] [Download]


Vanilla JS Keyboard Shortcut Libraries

Create Custom Keyboard Shortcuts With JavaScript – Shortcuts

A JavaScript library to handle keyboard shortcuts that let you create events triggered by custom keyboard combinations.

Create Custom Keyboard Shortcuts With JavaScript – Shortcuts

[Demo] [Download]


Capture Keyboard Input In Pure JavaScript – hotkeys

The hotkeys JavaScript library allows to capture keyboard input and supports bind custom hotkeys with modifier keys.

Capture Keyboard Input In Pure JavaScript – hotkeys

[Demo] [Download]


Add Keyboard-triggered Easter Eggs To Webpage – egg.js

A small (1.5kb) vanilla JavaScript library that adds easter eggs triggered by keyboard sequences to your webpage.

Add Keyboard-triggered Easter Eggs To Webpage – egg.js

[Demo] [Download]


Create Custom Key Binding Events – Shortcut.js

A tiny keyboard shortcuts library that makes any element (component) react to custom keyboard events.

Create Custom Key Binding Events – Shortcut.js

[Demo] [Download]


Bind Keyboard Shortcuts To Any Elements – KeyboardMaster

A tiny, easy, and dependency-free JavaScript library that allows you to bind keyboard shortcuts to any DOM elements.

Bind Keyboard Shortcuts To Any Elements – KeyboardMaster

[Demo] [Download]


Conclusion:

Looking for more JavaScript libraries to bind keyboard shortcuts on the web & mobile? See jQuery Keyboard Shortcut and JavaScript Keyboard sections for more details.