weasel API - v0.8.0
    Preparing search index...

    Interface UseKeybindingsOptions

    interface UseKeybindingsOptions {
        defaultTool?: string | null;
        disable?: boolean;
        isToolEligible?: (toolId: string) => boolean;
    }
    Index

    Properties

    defaultTool?: string | null

    Tool id Escape switches to. When omitted, defaults to whatever tools.active was when the hook first ran (i.e. the initial active tool). Pass null to disable Escape-returns-to-default behavior.

    disable?: boolean

    Skip all wiring. Useful for touch apps or test isolation.

    isToolEligible?: (toolId: string) => boolean

    Gate for keyboard tool activation: return false to refuse a tool the active mode doesn't allow. <SceneCanvas> wires this from getActiveMode + each tool's capabilities, using the same predicate ToolPalette uses to grey a button out — so the grey-out becomes a guarantee rather than a hint.

    Omit for consumers with no mode registry: every tool stays activatable.