Rich text / foldkit-richtext-dom/events

KeyBinding

interface · packages/richtext-dom/src/events.ts:33

interface KeyBinding {
  readonly chord: string
  readonly command: RichText.Command
}

One chord an application adds to the adapter's table, or overrides in it. Modifiers match exactly and the key matches what the browser reports, so Mod-b does not fire for Shift held, and a chord that types a symbol names the symbol: Shift+8 is Mod-Shift-* on a US layout, not Mod-Shift-8.

Members

KeyBinding.chord

property · packages/richtext-dom/src/events.ts:35

readonly chord: string

Mod-b, Mod-Shift-b, Alt-ArrowUp. Mod is Meta or Control, either one.

KeyBinding.command

property · packages/richtext-dom/src/events.ts:36

readonly command: RichText.Command