MCPcopy Index your code
hub / github.com/Effect-TS/effect / toUserInput

Function toUserInput

packages/cli/test/services/MockTerminal.ts:97–106  ·  view source on GitHub ↗
(
  key: string,
  modifiers: Partial<MockTerminal.Modifiers> = {}
)

Source from the content-addressed store, hash-verified

95 input.key.ctrl && (input.key.name === "c" || input.key.name === "d")
96
97const toUserInput = (
98 key: string,
99 modifiers: Partial<MockTerminal.Modifiers> = {}
100): Terminal.UserInput => {
101 const { ctrl = false, meta = false, shift = false } = modifiers
102 return {
103 input: Option.some(key),
104 key: { name: key, ctrl, meta, shift }
105 }
106}

Callers 2

inputTextFunction · 0.85
inputKeyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected