Skip to content

RameshRM/typewriter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

typewriter Build Status

Summary

typewriter, is a client-side javascript library enables to wireup keyboard eventing to DOM elements.

===

Features

  • Simplicity
  • To implement the features required to bubble up for Keyboard events.
  • Reduces the boiler plate coding for handling the keyboard eventing with keycodes
  • Simple api
  • Exposes KeyMap definition to provide key mapping set

==

Installation

===

Sample Usage

The following example handles a esc key on a Text element with Id Text.
   var $el = document.getElementById('Text') ;
    typewriter.on({keyMap : keyboard.keyMapDefs.Esc, state: 'up'},$el,function(kbEvent){
          alert('Escaped');
    });
The following example handles a Down Arrow key on a Text element with Id Text.
    var $el = document.getElementById('Text') ;
    typewriter.on({keyMap : keyboard.keyMapDefs.Down, state: 'up'},$el,function(kbEvent){
          alert('Down Arrow Pressed');
    });

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published