Primitives / foldkit-primitives/events
keyboardEvents
function · packages/primitives/src/events/keyboard.ts:55
function keyboardEvents(options?: {
readonly preventDefault?: (press: KeyPress) => boolean
}): Stream.Stream<KeyboardMessage>Key presses and releases on the window. A press made during an IME
composition is not reported: it types text, and is no shortcut. Without a window the stream is
empty instead of throwing. Lift with Subscription.persistentEntry, mapping
into the parent's Message.