onKeyDown function ✓ 100.0%
Last updated: 2026-03-05T11:49:57.418Z
Metrics
LOC: 11
Complexity: 5
Params: 1
Coverage: 100.0% (1/1 lines, 0x executed)
Signature
onKeyDown(e: KeyboardEvent): : void
Source Code
function onKeyDown(e: KeyboardEvent): void {
if (!session || session.status !== "recording") return;
// Only capture meaningful keys (Enter, Escape, Tab)
const capturedKeys = ["Enter", "Escape", "Tab"];
if (!capturedKeys.includes(e.key)) return;
const el = e.target as Element;
if (isExtensionUI(el)) return;
addStep(buildStep("press-key", el, { key: e.key }));
}
Dependencies (Outgoing)
| Target | Type |
|---|---|
| isExtensionUI | calls |
| addStep | calls |
| buildStep | calls |
No incoming dependencies.