Class zebkit.web.KeyEventUninfier <zebkit.web>

Class that is responsible for translating native DOM element key event into abstract event that further can be transfered to zebkit UI engine (or any other destination). Browsers key events support can be implemented with slight differences from the standards. The goal of the class is key events unification. The class fires three types of key events to passed event destination code:

  • $keyPressed(e)
  • $keyReleased(e)
  • $keyTyped(e)

For instance imagine we have a DOM Element and want to have identical sequence and parameters of key events the DOM element triggers. It can be done as follow:

 new KeyEventUnifier(domElement, {
     "$keyPressed" : function(e) {

     "$keyReleased" : function(e) {

     "$keyTyped" : function(e) {
zebkit.web.KeyEventUninfier (element, destination)