src/event/tungsten_event.js
function WEvent(evt) {
  if (evt) {
    this.originalEvent = evt;
    this.type = evt.type;
    this.which = evt.which || evt.charCode || evt.keyCode;
    if (!this.which && evt.button !== undefined) {
      this.which = ( evt.button & 1 ? 1 : ( evt.button & 2 ? 3 : ( evt.button & 4 ? 2 : 0 ) ) );
    }
    this.button = evt.button;
    this.currentTarget = evt.currentTarget;
    this.delegateTarget = null;
    this.target = evt.target || evt.srcElement;
    this.shiftKey = evt.shiftKey;
    this.altKey = evt.altKey;
    this.ctrlKey = evt.ctrlKey;
    this.metaKey = evt.metaKey;
  }
  this.current = undefined;
  this.previous = undefined;
  this.eventId = _.uniqueId('e');
  this.propagationStopped = false;
  this.immediatePropagationStopped = false;
}
function WEvent(evt) {
  if (evt) {
    this.originalEvent = evt;
    this.type = evt.type;
    this.which = evt.which || evt.charCode || evt.keyCode;
    if (!this.which && evt.button !== undefined) {
      this.which = ( evt.button & 1 ? 1 : ( evt.button & 2 ? 3 : ( evt.button & 4 ? 2 : 0 ) ) );
    }
    this.button = evt.button;
    this.currentTarget = evt.currentTarget;
    this.delegateTarget = null;
    this.target = evt.target || evt.srcElement;
    this.shiftKey = evt.shiftKey;
    this.altKey = evt.altKey;
    this.ctrlKey = evt.ctrlKey;
    this.metaKey = evt.metaKey;
  }
  this.current = undefined;
  this.previous = undefined;
  this.eventId = _.uniqueId('e');
  this.propagationStopped = false;
  this.immediatePropagationStopped = false;
}
function WEvent ( evt ) { if ( evt ) { this . originalEvent = evt ; this . type = evt . type ; this . which = evt . which || evt . charCode || evt . keyCode ; if ( ! this . which && evt . button !== undefined ) { this . which = ( evt . button & 1 ? 1 : ( evt . button & 2 ? 3 : ( evt . button & 4 ? 2 : 0 ) ) ) ; } this . button = evt . button ; this . currentTarget = evt . currentTarget ; this . delegateTarget = null ; this . target = evt . target || evt . srcElement ; this . shiftKey = evt . shiftKey ; this . altKey = evt . altKey ; this . ctrlKey = evt . ctrlKey ; this . metaKey = evt . metaKey ; } this . current = undefined ; this . previous = undefined ; this . eventId = _ . uniqueId ( 'e' ) ; this . propagationStopped = false ; this . immediatePropagationStopped = false ; }
Wrapper function for the event object
@param {Object} evt  Native event to wrap
Wrapper function for the event object