Skip to content

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

jKeys

Helps interpret javascript keydown and keypress events. JSKeys adds several functions to the KeybordEvent class as well as the jQuery.Event class, if it exists.

event.printable()

Returns the printable character that the combination of keys
should yield. Particularly useful for the "keydown" event, which
only returns key codes. 

This function cannot take into account
the state of the capslock key.

event.description()

Returns a textual description of the combination of keys pressed.
For example, it may return "ctrl-shift-f6".

event.keyToCode

An object that lets you find key codes by textual description
For example event.keyToCode.left is 37

event.codeToKeyInfo

An array of keycodes that contain information about the key.
For example:
  event.codeToKeyInfo[188].description = "comma"
  event.codeToKeyInfo[188].print = ","
  event.codeToKeyInfo[188].shiftPrint = "<"

About

JSKeys helps interpret javascript keydown and keypress events. It includes an array and object for mapping keyCode to a textual description and to the associated printable character.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages