code: function (id, buttonState) {
      var buttonStates = this.buttonStates;
      var evtName;
      var buttonName;
      var previousButtonState = buttonStates[id] = buttonStates[id] || {};
      if (buttonState.touched === previousButtonState.touched) { return false; }
      if (buttonState.touched) {
        evtName = 'start';
      } else {
        evtName = 'end';
      }
      previousButtonState.touched = buttonState.touched;
      this.el.dispatchEvent(new CustomEvent('touch' + evtName, {
        'touches': [], // avoid exception in TouchPanner due to namespace collision
        'detail': {
          id: id,
          state: previousButtonState,
          axis: this.controller.axes
        }
      }));
      buttonName = this.mapping['button' + id];
      this.updateButtonModel(buttonName, 'touch' + evtName);
      return true;
    }
docs: Determine whether a button touch has occured and emit events as appropriate.
  
  @param {string} id - id of the button to check.
  @param {object} buttonState - state of the button to check.
  @returns {boolean} true if button touch state changed, false otherwise.