BloopAI/vibe-kanban · warning

No key binding found for action ${action} in scope ${scope}

Error message

No key binding found for action ${action} in scope ${scope}

What it means

`createSemanticHook` builds keyboard shortcut hooks on top of a central keybinding registry. At hook execution it calls `getKeysFor(action, scope)`; if the registry has no keys registered for that action (in the given scope), the hook binds nothing and emits this console.warn. It is a developer-facing diagnostic, not a thrown exception — the handler simply never fires.

Source

Thrown at packages/web-core/src/shared/keyboard/useSemanticKey.ts:71

      {
        enabled,
        enableOnContentEditable,
        enableOnFormTags,
        preventDefault,
        scopes: scope ? [scope] : ['*'],
      },
      [
        keys,
        scope,
        enableOnContentEditable,
        enableOnFormTags,
        preventDefault,
        handler,
        isEnabled,
      ]
    );

    if (keys.length === 0) {
      console.warn(
        `No key binding found for action ${action} in scope ${scope}`
      );
    }
  };
}

View on GitHub (pinned to 4deb7eca8f)

Solutions

  1. Check the keyboard registry for the action's binding and register keys for it (globally or for the passed scope).
  2. Remove or fix the `scope` option so it matches a scope where the action has bindings, or omit scope to use defaults.
  3. Verify the action name passed to the hook matches the Action union value in the registry (fix typos/renames).
  4. If bindings are registered dynamically, ensure registration happens before the component using the hook mounts.

Example fix

// before
useKeySubmit(save, { scope: Scope.KanbanBoard }); // no submit binding in KanbanBoard scope

// after
useKeySubmit(save); // uses default scope where 'submit' is registered
// or register: registerKeys('submit', [{ key: 'mod+enter' }], Scope.KanbanBoard)
Defensive patterns

Strategy: fallback

Validate before calling

import { getKeysFor, Action, Scope } from '@/shared/keyboard/registry';
export function assertBinding(action: Action, scope?: Scope) {
  if (getKeysFor(action, scope).length === 0) {
    throw new Error(`Action "${action}" has no key binding${scope ? ` in scope ${scope}` : ''}`);
  }
}

Type guard

function hasBinding(action: Action, scope?: Scope): boolean {
  return getKeysFor(action, scope).length > 0;
}

Try / catch

try {
  assertBinding('submit', scope);
  useKeySubmit(save, { scope });
} catch (e) {
  console.error('Keybinding misconfiguration:', e);
  // fall back to an explicit button affordance so the feature still works
}

Prevention

When it happens

Trigger: Calling a semantic hook (useKeySubmit, useKeyCreate, useKeyExit, useKeyFocusSearch, useKeyNavUp, useKeyNavDown, etc.) with a scope in which the action has no registered keybinding; a typo'd action name; registry not yet populated/initialized when the hook mounts.

Common situations: Passing a custom scope string that has no scoped bindings registered; forgetting to register the action in the keyboard registry; action renamed in the registry but not in hook call sites; hotkey config loaded async after mount.

Related errors


AI-assisted analysis of BloopAI/vibe-kanban@4deb7eca8f (2026-08-29). Data as JSON: /api/errors/cb2c83e059d1ad33. Report an issue: GitHub.