• Home
  • WORDPRESS
    • PLUGINS
    • PHP
    • Themes
    • DEVELOPMENT
      • Javascript
      • JQuery
      • Mootools
  • WEB DESIGN
    • DESIGN
    • CSS
    • HTML
  • TYPOGRAPHY
    • FONTS
  • RESOURCES
    • TUTORIALS
    • THEMES
    • SLIDERS
    • TECHNOLOGY
  • ARCHIVES
  • CONTACT
  • Advertise

Code Geekz

    • Most Popular

      All time

    • 30 Best Tools for Data Visualization

      37 Comments

    • Best PHP Frameworks for Developers

      33 Comments

    • Latest Stories

      What is new?

    • Building Product Teams That Scale: The Case for Remote .NET Developers

      May 21, 2025

    • Choosing a WooCommerce Theme? Here’s What Most Store Owners Get Wrong

      May 9, 2025

    • Comments

      Most Recent

    • B. Frances on:

      Best WordPress Wedding Themes

    • Ultimate Content Locker Pro on:

      Best WordPress Social Content Locker Plugins for 2017

  • Home
  • WORDPRESS
    • PLUGINS
    • PHP
    • Themes
    • DEVELOPMENT
      • Javascript
      • JQuery
      • Mootools
  • WEB DESIGN
    • DESIGN
    • CSS
    • HTML
  • TYPOGRAPHY
    • FONTS
  • RESOURCES
    • TUTORIALS
    • THEMES
    • SLIDERS
    • TECHNOLOGY
  • ARCHIVES
  • CONTACT
  • Advertise

10 JavaScript Libraries to Handle Keyboard Events

1
  • by Gavin
  • In Javascript
  • — 20 Dec, 2013

Writing a variety of event handlers to your HTML DOM enables JavaScript within registering various elements in your HTML document. Since events are usually used in conjunction with functions, they usually aren’t executed prior to the particular event occurrence, i.e – like when a user is prompted to click on a specified button.

Incorporating event handlers to your HTML documents and registering functions via JavaScript is great way to make your web applications react similarly to a desktop application. The following jQuery plugins we have collected will enable you in creating a variety of keyboard event handlers which will make your themes and websites a lot more appealing to users.

Using the keyboard to access certain elements is easier than having to constantly use a mouse, and it makes it more enjoyable since navigation becomes easier and the end user is able to access content faster. We hope you will enjoy the list and find one which will be suitable to your needs.

1. Mousetrap

mousetrap
Mousetrap is a simple library for handling keyboard shortcuts in Javascript. It is around 1.6kb minified and gzipped and 3kb minified, has no external dependencies. The bind method is the main call you will be making. This will bind a specified keyboard command to a callback method.
There is a third argument you can use to specify the type of event to listen for. It can be keypress, keydown or keyup. Any keys separated by a space will be considered a sequence. If you type each key in order the final one in the sequence will trigger the callback. Mousetrap has been tested and should work in Internet Explorer 6+, Safari, Firefox, Chrome.
 
Source  

2. Jwerty

jwerty
jwerty is a JS lib which allows you to bind, fire and assert key combination strings against elements and events. It normalises the poor std api into something easy to use and clear. All jwerty events will require a jwertyCode in some way. jwertyCodes can be passed as strings, or arrays, strings being the easiest way to express a combo.
jwerty is a small library, weighing in at around 1.5kb bytes minified and gzipped (~3kb minified). jwerty has no dependencies, but is compatible with jQuery, Zepto or Ender if you include those packages alongside it.
 
Source  

3. Keypress

keypress
Keypress is an input capture library with some very special features, it is easy to pick up and use, has a reasonable footprint (~9kb), and has no dependencies. It can be used for simple cases (like if “x” is pressed, trigger a function) and more advanced scenarios like creating combos of any type.The library has callbacks for keyup + keydown events, an option exists for capturing the input only once and much more.
 
Source  

4. KeyboardJS

KeyboardJS
KeyboardJS, a standalone JavaScript library, handles the keyboard part and helps us to understand any key strokes and turn them into actions. The library has support for both single + combo strokes and can work with keyboards of any locale. It has callbacks for both the “press” and “release” events so that we can trigger functions whenever preferred.
 
Source  

5. Keymaster.js

keymaster
Keymaster is a simple micro-library for defining and dispatching keyboard shortcuts in web applications. Keymaster has no dependencies and can be used completely standalone. It should not interfere with any JavaScript libraries or frameworks.
 
Source  

6. Kibo

kibo
Kibo is a simple JavaScript library for handling keyboard events. Kibo has no dependencies. Kibo’s constructor takes an optional argument – the HTML element on which you want to define the event handler.
https://github.com/marquete/kibo

7. Keymage

keymage
Keymage is a small library for handling key bindings in JavaScript. It was written out of the fact that no other library supported combination of all necessary features and their design made it easier to write a new one.
 
Source  

8. Keycode.js

keycodejs
This is a library for normalizing JavaScript key codes across browsers. This library works with key objects, which are { Int code, bool shift, bool alt, bool ctrl } JavaScript objects that record the key code along with any modifiers pressed. translate_event() returns one of these; hot_key() takes one of these and returns a string suitable for the JQuery HotKey plugin or Binny V A’s shortcut.js library.
 
Source  

9. Open JS

openjs
OpenJS lets you add keyboard shortcuts to your JavaScript app.
 
Source  

10. JavaScript Shortcuts Library

JavaScript Shortcuts Library
Its an impressive shortcuts library for easy development.
 
Source  

Share

Tags: javascript keyboard event libraryjavascript keyboard eventsjquery keyboard event handlersjquery keypress events

— Gavin

A Web addicted Geek stuck inside Tron.

  • Previous story 30 jQuery Image Gallery Plugins
  • Next story 20 Fresh and Free Web Development Tools

You may also like...

  • Best JavaScript Debugging Tools for Developers
  • Top 13 JavaScript Libraries for December 2016
  • jquery grid plugins in web design 15 Best jQuery Grid Plugins for Developers
  • Collection of Best JavaScript Libraries for 2014

Enter your em@il & get our posts delivered.





  • Enter your em@il & get our posts delivered.

  • Codegeekz
    • Home
    • Javascript
    • 10 JavaScript Libraries to Handle Keyboard Events
    • Home
    • WORDPRESS
      • PLUGINS
      • PHP
      • Themes
      • DEVELOPMENT
        • Javascript
        • JQuery
        • Mootools
    • WEB DESIGN
      • DESIGN
      • CSS
      • HTML
    • TYPOGRAPHY
      • FONTS
    • RESOURCES
      • TUTORIALS
      • THEMES
      • SLIDERS
      • TECHNOLOGY
    • ARCHIVES
    • CONTACT
    • Advertise

    CODEGEEKZ.COM