Awesome Handling of Keyboard Events with JavaScript | jwerty.js

jwerty is a JS lib that allows you to concatenate, launch, and assert key combination strings against objects and events. It normalizes a weak API into something that’s easy to use and clear.

jwerty is a small library that weighs about 1.5KB minified and compressed (~3KB minified). jwerty does not have any dependencies but is compatible with jQuery, Zepto, Ender, or CanJS if you include these packages beside it.

keyboard events javascript, javascript keyboard events example, keydown event javascript, keyboardevent example, keyboard event typescript, react keyboard events

How to make use of it:

1. Insert the main JavaScript file jwerty.js just before the closing tag.

<script src="jwerty.js"></script>

2. Connect your callback function to the keyboard combination.

jwerty.key('ctrl+alt+A', function () { 
  // do something 

3. It also supports comma-separated key commas sequences.

jwerty.key('↑,↑,↓,↓,←,→,←,→,B,A,↩', function () { 
  // do something 

4. REGX is also supported.

jwerty.key('ctrl+[a-c]', function () { 
  // do something 

Handling Keyboard Events, jwerty Plugin/Github, new keyboardevent

See Demo And Download

Official Website(keithamus): Click Here

This superior jQuery/javascript plugin is developed by keithamus. For extra advanced usage, please go to the official website.

Related Posts


Create Side Sliders Input Values Using Mouse Drag | Pointer Lock

HTML Range Slider is a lightweight library to create side sliders to adjust values easily and precisely by making use of the Pointer Lock API. Side Slider…


Smooth and Lightweight Parallax Scroll Library in Pure Javascript

Lightweight and seamless parallax scrolling library implemented in pure javascript using hardware acceleration for additional performance. Main Features Extremely lightweight with no dependencies A few kilobytes of pure…


How to Convert Form Data to JSON with HTML Forms | FormsJS

FormsJS is a simple-to-use JavaScript library that covers type subject values to JSON in real time. The items containing the data category will be analyzed automatically. It…


A Small jQuery Extension to Convert An Editable HTML Table

Editable Table is a small jQuery extension to convert an editable HTML table for fast data entry and validation. A small jQuery extension to convert a static…

Simple jQuery Plugin for Embedding YouTube Videos As Cover Background is a jQuery plugin built to facilitate YouTube embeds as cover wallpaper using the YouTube Embed API. There is another jQuery Youtube Video Background plugin that…


Interactive Data Table Generator with JS/jQuery and JSON | Tabulator

Tabulator allows you to create interactive tables in seconds from any HTML Table, JavaScript array, AJAX data source, or JSON format data. Just include the library in your…