code: function main() {
      this.prior = this.current;
      this.current = this.current.apply(this, arguments) || this.current;
      // Call user transition function, if defined
      if (this.transition) {
          this.transition.apply(this, arguments);
      }
  }
docs: ============================================================================ Core functions Entry function for all input events