docs: function sendEvent(button, pos) {
            var data;
            if (self.vt300Mouse) {
                // NOTE: Unstable.
                // http://www.vt100.net/docs/vt3xx-gp/chapter15.html
                button &= 3;
                pos.x -= 32;
                pos.y -= 32;
                data = '\x1b[24';
                if (button === 0) data += '1';
                else if (button === 1) data += '3';
                else if (button === 2) data += '5';
                else if (button === 3) return;
                else data += '0';
                data += '~[' + pos.x + ',' + pos.y + ']\r';
                self.send(data);
                return;
            }
  
            if (self.decLocator) {
                // NOTE: Unstable.
                button &= 3;
                pos.x -= 32;
                pos.y -= 32;
                if (button === 0) button = 2;
                else if (button === 1) button = 4;
                else if (button === 2) button = 6;
                else if (button === 3) button = 3;
                self.send('\x1b[' + button + ';' + (button === 3 ? 4 : 0) + ';' + pos.y + ';' + pos.x + ';' + (pos.page || 0) + '&w');
                return;
            }
  
            if (self.urxvtMouse) {
                pos.x -= 32;
                pos.y -= 32;
                pos.x++;
                pos.y++;
                self.send('\x1b[' + button + ';' + pos.x + ';' + pos.y + 'M');
                return;
            }
  
            if (self.sgrMouse) {
                pos.x -= 32;
                pos.y -= 32;
                self.send('\x1b[<' + ((button & 3) === 3 ? button & ~3 : button) + ';' + pos.x + ';' + pos.y + ((button & 3) === 3 ? 'm' : 'M'));
                return;
            }
  
            data = [];
  
            encode(data, button);
            encode(data, pos.x);
            encode(data, pos.y);
  
            self.send('\x1b[M' + String.fromCharCode.apply(String, data));
        }