Rich text / foldkit-richtext-dom/events

intentFor

function · packages/richtext-dom/src/events.ts:83

function intentFor(
  event: Event,
  composing?: boolean,
  keymap?: ReadonlyArray<KeyBinding>,
): Intent | undefined

Reads one event as intent. composing tells the adapter that an IME owns the interaction: the browser must keep its temporary text, so composition input is passed through and committed on compositionend instead.

keymap is checked before the built-in chords, so an application adds to the table or overrides an entry without forking the adapter.