MCPcopy
hub / github.com/wavetermdev/waveterm / handleKeyDown

Method handleKeyDown

frontend/app/view/webview/webview.tsx:351–362  ·  view source on GitHub ↗
(event: React.KeyboardEvent<HTMLInputElement>)

Source from the content-addressed store, hash-verified

349 }
350
351 handleKeyDown(event: React.KeyboardEvent<HTMLInputElement>) {
352 const waveEvent = adaptFromReactOrNativeKeyEvent(event);
353 if (checkKeyPressed(waveEvent, "Enter")) {
354 const url = globalStore.get(this.url);
355 this.loadUrl(url, "enter");
356 this.urlInputRef.current?.blur();
357 return;
358 }
359 if (checkKeyPressed(waveEvent, "Escape")) {
360 this.webviewRef.current?.focus();
361 }
362 }
363
364 handleFocus(event: React.FocusEvent<HTMLInputElement>) {
365 globalStore.set(this.urlWrapperClassName, "focused");

Callers

nothing calls this directly

Calls 4

loadUrlMethod · 0.95
checkKeyPressedFunction · 0.90
getMethod · 0.80

Tested by

no test coverage detected