Primitives / foldkit-primitives/events

keyboardEvents

function · packages/primitives/src/events/keyboard.ts:29

function keyboardEvents(options?: {
  readonly preventDefault?: (press: KeyPress) => boolean
}): Stream.Stream<KeyboardMessage>

Key presses and releases on the window. Without a window the stream is empty instead of throwing. Lift with Subscription.persistentEntry, mapping into the parent's Message.