MCPcopy Create free account
hub / github.com/Noumena-Network/code / dispatchKeyboardEvent

Method dispatchKeyboardEvent

src/ink/ink.tsx:1422–1436  ·  view source on GitHub ↗
(parsedKey: ParsedKey)

Source from the content-addressed store, hash-verified

1420 dispatchHover(this.rootNode, col, row, this.hoveredNodes);
1421 }
1422 dispatchKeyboardEvent(parsedKey: ParsedKey): void {
1423 const target = this.focusManager.activeElement ?? this.rootNode;
1424 const event = new KeyboardEvent(parsedKey);
1425 dispatcher.dispatchDiscrete(target, event);
1426
1427 // Tab cycling is the default action — only fires if no handler
1428 // called preventDefault(). Mirrors browser behavior.
1429 if (!event.defaultPrevented && parsedKey.name === 'tab' && !parsedKey.ctrl && !parsedKey.meta) {
1430 if (parsedKey.shift) {
1431 this.focusManager.focusPrevious(this.rootNode);
1432 } else {
1433 this.focusManager.focusNext(this.rootNode);
1434 }
1435 }
1436 }
1437 /**
1438 * Look up the URL at (col, row) in the current front frame. Checks for
1439 * an OSC 8 hyperlink first, then falls back to scanning the row for a

Callers 1

processKeysInBatchFunction · 0.80

Calls 3

dispatchDiscreteMethod · 0.80
focusPreviousMethod · 0.80
focusNextMethod · 0.80

Tested by

no test coverage detected