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

Method giveFocus

frontend/app/view/term/term-model.ts:601–614  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

599 }
600
601 giveFocus(): boolean {
602 if (this.searchAtoms && globalStore.get(this.searchAtoms.isOpen)) {
603 console.log("search is open, not giving focus");
604 return true;
605 }
606 const termMode = globalStore.get(this.termMode);
607 if (termMode == "term") {
608 if (this.termRef?.current?.terminal) {
609 this.termRef.current.terminal.focus();
610 return true;
611 }
612 }
613 return false;
614 }
615
616 keyDownHandler(waveEvent: WaveKeyboardEvent): boolean {
617 if (keyutil.checkKeyPressed(waveEvent, "Ctrl:r")) {

Callers 4

refocusNodeFunction · 0.45
refocusNodeMethod · 0.45
TerminalViewFunction · 0.45
block.tsxFile · 0.45

Calls 1

getMethod · 0.80

Tested by

no test coverage detected