MCPcopy
hub / github.com/codeaashu/claude-code / i3

Method i3

src/server/web/public/terminal.js:583–606  ·  view source on GitHub ↗
(t4)

Source from the content-addressed store, hash-verified

581 bindMouse() {
582 const e3 = this, t3 = this.element;
583 function i3(t4) {
584 const i4 = e3._mouseService.getMouseReportCoords(t4, e3.screenElement);
585 if (!i4) return false;
586 let s4, r2;
587 switch (t4.overrideType || t4.type) {
588 case "mousemove":
589 r2 = 32, void 0 === t4.buttons ? (s4 = 3, void 0 !== t4.button && (s4 = t4.button < 3 ? t4.button : 3)) : s4 = 1 & t4.buttons ? 0 : 4 & t4.buttons ? 1 : 2 & t4.buttons ? 2 : 3;
590 break;
591 case "mouseup":
592 r2 = 0, s4 = t4.button < 3 ? t4.button : 3;
593 break;
594 case "mousedown":
595 r2 = 1, s4 = t4.button < 3 ? t4.button : 3;
596 break;
597 case "wheel":
598 if (e3._customWheelEventHandler && false === e3._customWheelEventHandler(t4)) return false;
599 if (0 === e3.viewport.getLinesScrolled(t4)) return false;
600 r2 = t4.deltaY < 0 ? 0 : 1, s4 = 4;
601 break;
602 default:
603 return false;
604 }
605 return !(void 0 === r2 || void 0 === s4 || s4 > 4) && e3.coreMouseService.triggerMouseEvent({ col: i4.col, row: i4.row, x: i4.x, y: i4.y, button: s4, action: r2, ctrl: t4.ctrlKey, alt: t4.altKey, shift: t4.shiftKey });
606 }
607 const s3 = { mouseup: null, wheel: null, mousedrag: null, mousemove: null }, n2 = { mouseup: (e4) => (i3(e4), e4.buttons || (this._document.removeEventListener("mouseup", s3.mouseup), s3.mousedrag && this._document.removeEventListener("mousemove", s3.mousedrag)), this.cancel(e4)), wheel: (e4) => (i3(e4), this.cancel(e4, true)), mousedrag: (e4) => {
608 e4.buttons && i3(e4);
609 }, mousemove: (e4) => {

Callers

nothing calls this directly

Calls 3

getMouseReportCoordsMethod · 0.80
getLinesScrolledMethod · 0.80
triggerMouseEventMethod · 0.80

Tested by

no test coverage detected