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

Method _keyPress

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

Source from the content-addressed store, hash-verified

723 })(e3) || this.focus(), this.updateCursorStyle(e3), this._keyPressHandled = false);
724 }
725 _keyPress(e3) {
726 let t3;
727 if (this._keyPressHandled = false, this._keyDownHandled) return false;
728 if (this._customKeyEventHandler && false === this._customKeyEventHandler(e3)) return false;
729 if (this.cancel(e3), e3.charCode) t3 = e3.charCode;
730 else if (null === e3.which || void 0 === e3.which) t3 = e3.keyCode;
731 else {
732 if (0 === e3.which || 0 === e3.charCode) return false;
733 t3 = e3.which;
734 }
735 return !(!t3 || (e3.altKey || e3.ctrlKey || e3.metaKey) && !this._isThirdLevelShift(this.browser, e3) || (t3 = String.fromCharCode(t3), this._onKey.fire({ key: t3, domEvent: e3 }), this._showCursor(), this.coreService.triggerDataEvent(t3, true), this._keyPressHandled = true, this._unprocessedDeadKey = false, 0));
736 }
737 _inputEvent(e3) {
738 if (e3.data && "insertText" === e3.inputType && (!e3.composed || !this._keyDownSeen) && !this.optionsService.rawOptions.screenReaderMode) {
739 if (this._keyPressHandled) return false;

Callers 1

_bindKeysMethod · 0.95

Calls 5

cancelMethod · 0.95
_isThirdLevelShiftMethod · 0.95
_showCursorMethod · 0.95
fireMethod · 0.80
triggerDataEventMethod · 0.80

Tested by

no test coverage detected