View as Markdown

API reference: @salmonui/data-grid/engine

Keymapinterface

import type { Keymap } from '@salmonui/data-grid/engine';

Also exported from @salmonui/data-grid/engine/keyboard.

interface Keymap {
    readonly platform: KeyPlatform;
    resolve(event: KeyEventLike, context: KeyContext): string | null;
    resolveCombo(combo: string, context: KeyContext): string | null;
    combosOf(command: string): readonly string[];
    readonly bindings: readonly KeyBinding[];
}
Keymap members (5)
NameSignatureDescription
platformreadonly platform: KeyPlatform;
resolveresolve(event: KeyEventLike, context: KeyContext): string | null;

Keyboard command bound to the event's combo in context, or null.

resolveComboresolveCombo(combo: string, context: KeyContext): string | null;
combosOfcombosOf(command: string): readonly string[];

Effective canonical combos of a command on this platform.

bindingsreadonly bindings: readonly KeyBinding[];