MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / keyDownHandler

Method keyDownHandler

frontend/app/view/webview/webview.tsx:564–588  ·  view source on GitHub ↗
(e: WaveKeyboardEvent)

Source from the content-addressed store, hash-verified

562 }
563
564 keyDownHandler(e: WaveKeyboardEvent): boolean {
565 if (checkKeyPressed(e, "Cmd:l")) {
566 this.urlInputRef?.current?.focus();
567 this.urlInputRef?.current?.select();
568 return true;
569 }
570 if (checkKeyPressed(e, "Cmd:r")) {
571 this.webviewRef.current?.reload();
572 return true;
573 }
574 if (checkKeyPressed(e, "Cmd:ArrowLeft")) {
575 this.handleBack(null);
576 return true;
577 }
578 if (checkKeyPressed(e, "Cmd:ArrowRight")) {
579 this.handleForward(null);
580 return true;
581 }
582 if (checkKeyPressed(e, "Cmd:o")) {
583 const curVal = globalStore.get(this.typeaheadOpen);
584 globalStore.set(this.typeaheadOpen, !curVal);
585 return true;
586 }
587 return false;
588 }
589
590 setZoomFactor(factor: number | null) {
591 // null is ok (will reset to default)

Callers

nothing calls this directly

Calls 5

handleBackMethod · 0.95
handleForwardMethod · 0.95
checkKeyPressedFunction · 0.90
getMethod · 0.80
setMethod · 0.80

Tested by

no test coverage detected