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

Function shouldDispatchToBlock

frontend/app/store/keymodel.ts:104–121  ·  view source on GitHub ↗
(e: WaveKeyboardEvent)

Source from the content-addressed store, hash-verified

102}
103
104function shouldDispatchToBlock(e: WaveKeyboardEvent): boolean {
105 if (globalStore.get(atoms.modalOpen)) {
106 return false;
107 }
108 const activeElem = document.activeElement;
109 if (activeElem != null && activeElem instanceof HTMLElement) {
110 if (activeElem.tagName == "INPUT" || activeElem.tagName == "TEXTAREA" || activeElem.contentEditable == "true") {
111 if (activeElem.classList.contains("dummy-focus") || activeElem.classList.contains("dummy")) {
112 return true;
113 }
114 if (keyutil.isInputEvent(e)) {
115 return false;
116 }
117 return true;
118 }
119 }
120 return true;
121}
122
123function getStaticTabBlockCount(): number {
124 const tabId = globalStore.get(atoms.staticTabId);

Callers 1

appHandleKeyDownFunction · 0.85

Calls 1

getMethod · 0.80

Tested by

no test coverage detected