MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / createKey

Function createKey

cli/src/utils/__tests__/keyboard-actions.test.ts:11–20  ·  view source on GitHub ↗
(overrides: Partial<KeyEvent> = {})

Source from the content-addressed store, hash-verified

9import type { KeyEvent } from '@opentui/core'
10
11const createKey = (overrides: Partial<KeyEvent> = {}): KeyEvent =>
12 ({
13 name: '',
14 sequence: '',
15 ctrl: false,
16 meta: false,
17 shift: false,
18 option: false,
19 ...overrides,
20 }) as KeyEvent
21
22const escapeKey = createKey({ name: 'escape' })
23const ctrlC = createKey({ name: 'c', ctrl: true })

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected