Interface: PressKeyOption
Defined in: packages/core/src/interactor/PressKeyOption.ts:12
Options for Interactor.pressKey.
Each flag mirrors the corresponding KeyboardEvent boolean (ctrlKey,
shiftKey, altKey, metaKey). They let a single pressKey express a
modifier chord, so the dispatched key event carries the held modifiers a
component reads off the event — e.g. activating a Ctrl+Enter "submit"
shortcut, or proving the negative case where Shift+Enter must NOT fire a
plain-Enter handler (it should insert a newline instead). Omitting a flag
leaves that modifier unpressed.
Properties​
alt?​
optionalalt?:boolean
Defined in: packages/core/src/interactor/PressKeyOption.ts:18
Hold Alt/Option during the key press (KeyboardEvent.altKey).
ctrl?​
optionalctrl?:boolean
Defined in: packages/core/src/interactor/PressKeyOption.ts:14
Hold Control during the key press (KeyboardEvent.ctrlKey).
meta?​
optionalmeta?:boolean
Defined in: packages/core/src/interactor/PressKeyOption.ts:20
Hold Meta/Command/Windows during the key press (KeyboardEvent.metaKey).
shift?​
optionalshift?:boolean
Defined in: packages/core/src/interactor/PressKeyOption.ts:16
Hold Shift during the key press (KeyboardEvent.shiftKey).