code: function sendButton(ev) {
      var button
        , pos;
  
      // get the xterm-style button
      button = getButton(ev);
  
      // get mouse coordinates
      pos = getCoords(ev);
      if (!pos) return;
  
      sendEvent(button, pos);
  
      switch (ev.type) {
        case 'mousedown':
          pressed = button;
          break;
        case 'mouseup':
          // keep it at the left
          // button, just in case.
          pressed = 32;
          break;
        case wheelEvent:
          // nothing. don't
          // interfere with
          // `pressed`.
          break;
      }
    }
docs: mouseup, mousedown, mousewheel left click: ^[[M 3<^[[M#3< mousewheel up: ^[[M`3>