MCPcopy Index your code
hub / github.com/codeaashu/claude-code / dispatchKeyboardEvent

Method dispatchKeyboardEvent

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

Source from the content-addressed store, hash-verified

1267 dispatchHover(this.rootNode, col, row, this.hoveredNodes);
1268 }
1269 dispatchKeyboardEvent(parsedKey: ParsedKey): void {
1270 const target = this.focusManager.activeElement ?? this.rootNode;
1271 const event = new KeyboardEvent(parsedKey);
1272 dispatcher.dispatchDiscrete(target, event);
1273
1274 // Tab cycling is the default action — only fires if no handler
1275 // called preventDefault(). Mirrors browser behavior.
1276 if (!event.defaultPrevented && parsedKey.name === 'tab' && !parsedKey.ctrl && !parsedKey.meta) {
1277 if (parsedKey.shift) {
1278 this.focusManager.focusPrevious(this.rootNode);
1279 } else {
1280 this.focusManager.focusNext(this.rootNode);
1281 }
1282 }
1283 }
1284 /**
1285 * Look up the URL at (col, row) in the current front frame. Checks for
1286 * 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