typewriter
, is a client-side javascript library enables to wireup keyboard eventing to DOM elements.
===
- 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
==
===
var $el = document.getElementById('Text') ;
typewriter.on({keyMap : keyboard.keyMapDefs.Esc, state: 'up'},$el,function(kbEvent){
alert('Escaped');
});
var $el = document.getElementById('Text') ;
typewriter.on({keyMap : keyboard.keyMapDefs.Down, state: 'up'},$el,function(kbEvent){
alert('Down Arrow Pressed');
});