MCPcopy Index your code
hub / github.com/codeaashu/claude-code / triggerMouseEvent

Method triggerMouseEvent

src/server/web/public/terminal.js:5496–5505  ·  view source on GitHub ↗
(e3)

Source from the content-addressed store, hash-verified

5494 this._activeEncoding = e3;
5495 }
5496 reset() {
5497 this.activeProtocol = "NONE", this.activeEncoding = "DEFAULT", this._lastEvent = null;
5498 }
5499 triggerMouseEvent(e3) {
5500 if (e3.col < 0 || e3.col >= this._bufferService.cols || e3.row < 0 || e3.row >= this._bufferService.rows) return false;
5501 if (4 === e3.button && 32 === e3.action) return false;
5502 if (3 === e3.button && 32 !== e3.action) return false;
5503 if (4 !== e3.button && (2 === e3.action || 3 === e3.action)) return false;
5504 if (e3.col++, e3.row++, 32 === e3.action && this._lastEvent && this._equalEvents(this._lastEvent, e3, "SGR_PIXELS" === this._activeEncoding)) return false;
5505 if (!this._protocols[this._activeProtocol].restrict(e3)) return false;
5506 const t3 = this._encodings[this._activeEncoding](e3);
5507 return t3 && ("DEFAULT" === this._activeEncoding ? this._coreService.triggerBinaryEvent(t3) : this._coreService.triggerDataEvent(t3, true)), this._lastEvent = e3, true;
5508 }

Callers 1

i3Method · 0.80

Calls 3

_equalEventsMethod · 0.80
triggerBinaryEventMethod · 0.80
triggerDataEventMethod · 0.80

Tested by

no test coverage detected