JavaScript Keyboard Shortcuts: Execute functions when certain keys are pressed

Recommend this page to a friend!
  Info   View files Example   Demos   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 145 All time: 344 This week: 14Up
Version License JavaScript version Categories
keyboard-bshortcuts 1.0GNU General Publi...1.0Events
Description Author

This object can execute functions when certain keys are pressed.

It takes a given page element and listen to key press events.

The object can register different callback functions that will be called when specific keys are pressed inside the specified page element.

The object accepts combinations of CTRL, ALT and Shift keys.

The same callbacks can also be unregistered, so the object stops listening to the specified key presses.

Innovation Award
JavaScript Programming Innovation award winner
June 2015

Prize: One book of choice by Packt
In JavaScript it is easy to handle keyboard events. However, if you you want to handle different key events with different actions, you need to decode the keyboard events and dispatch the specific actions for each key.

This JavaScript object simplifies this process by assigning different callback functions to each of keys you need to handle its events.

Manuel Lemos
Picture of Everton da Rosa
  Performance   Level  
Name: Everton da Rosa <contact>
Classes: 7 packages by
Country: Brazil Brazil
Age: 41
All time rank: 506 in Brazil Brazil
Week rank: 6 Up1 in Brazil Brazil Up
Innovation award
Innovation award
Nominee: 3x

Winner: 3x

  KBShort on Cloud9External page  
  Files folder image Files  
File Role Description
Accessible without login Plain text file index.html Example Example of use
Plain text file kbshort.js Class Main class file

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:344
This week:14Up