Skip to content

jbheber/HotKeysEngine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hot Keys Engine

Javascript plugin for creating hot keys

Add this script to your web page. In a separate js file register the different actions to associate to the keyboard keys and modifiers.

For the plugin to recognize your custom actions you have to use the HotKeys.attach function, which receives an array of hot key jsons. The format of a hot key json must be:

{
  "key": HotKeys.Keys.d,
  "modifiers": [HotKeys.Keys.Shift], //Optional
  "callback": function () {
      //your code
  }
  "params": {
    //parameters that your function will receive
  }
}
HotKeys.attach([
  //hot key jsons
], this);

To remove a custom hot key

HotKeys.detach([
  //hot key jsons
], this);

To add the plugin key listener

HotKeys.addKeyListener()

Installation

npm i hotkeysengine

About

Javascript plugin for creating hot keys

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •