Function
toUserInput
(
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 | |
| 97 | const 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 | } |
Tested by
no test coverage detected