code: function(evt) {
          var propagate = true,
              element = OpenLayers.Event.element(evt);
          if (element && (OpenLayers.Event.isLeftClick(evt) || !~evt.type.indexOf("mouse"))) {
              // was a button pressed?
              var button = this.getPressedButton(element);
              if (button) {
                  if (evt.type === "keydown") {
                      switch (evt.keyCode) {
                      case OpenLayers.Event.KEY_RETURN:
                      case OpenLayers.Event.KEY_SPACE:
                          this.target.triggerEvent("buttonclick", {
                              buttonElement: button
                          });
                          OpenLayers.Event.stop(evt);
                          propagate = false;
                          break;
                      }
                  } else if (this.startEvt) {
                      if (this.completeRegEx.test(evt.type)) {
                          var pos = OpenLayers.Util.pagePosition(button);
                          var viewportElement = OpenLayers.Util.getViewportElement();
                          var scrollTop = window.pageYOffset || viewportElement.scrollTop;
                          var scrollLeft = window.pageXOffset || viewportElement.scrollLeft;
                          pos[0] = pos[0] - scrollLeft;
                          pos[1] = pos[1] - scrollTop;
                          
                          this.target.triggerEvent("buttonclick", {
                              buttonElement: button,
                              buttonXY: {
                                  x: this.startEvt.clientX - pos[0],
                                  y: this.startEvt.clientY - pos[1]
                              }
                          });
                      }
                      if (this.cancelRegEx.test(evt.type)) {
                          delete this.startEvt;
                      }
                      OpenLayers.Event.stop(evt);
                      propagate = false;
                  }
                  if (this.startRegEx.test(evt.type)) {
                      this.startEvt = evt;
                      OpenLayers.Event.stop(evt);
                      propagate = false;
                  }
              } else {
                  propagate = !this.ignore(OpenLayers.Event.element(evt));
                  delete this.startEvt;
              }
          }
          return propagate;
      }
docs: Method: buttonClick
  Check if a button was clicked, and fire the buttonclick event
  
  Parameters:
  evt - {Event}