Skip to content

[Bug]: Settings → Keybindings shortcut pills misrender meta, ctrl, and named keys for default shortcuts #43382

Done

Description

@AymanKhan9

Summary

In Settings → Keybindings, the visual shortcut pills (KeybindingPill) misrender modifier symbols, modifier order, and named keys for several built-in default shortcuts—disagreeing with the button's own aria-label (formatShortcutLabel) and the Add keybinding dropdown.

Steps to reproduce

  1. Open Settings → Keybindings with default keybindings.
  2. Inspect the shortcut pills for:
    • Terminal: Previous (cmd+shift+[ and ctrl+alt+[)
    • Queue: Edit Last Queued Message (alt+arrowup)
    • Focus Next Workspace Area (f6)

Expected behavior

Shortcut pills use the same platform modifier symbols, order, and formatted key labels as formatShortcutLabel:

  • macOS: ⇧ ⌘ [, ⌃ ⌥ [, ⌥ Up, F6
  • Linux / Windows: Shift Meta [, Ctrl Alt [, Alt Up, F6

Actual behavior

  • meta is unhandled and renders as literal lowercase meta (meta ⇧ [ on both macOS and Linux/Windows).
  • ctrl renders the macOS symbol ⌃ even on Linux/Windows (⌃ Alt [).
  • shift renders ⇧ on Linux/Windows.
  • Named keys render raw config tokens (arrowup, arrowdown, enter, f6) instead of Up, Down, Enter, F6.
  • Modifiers render in config order (mod, meta, ctrl, alt, shift) instead of platform order (⌃⌥⇧⌘ on macOS, Ctrl / Alt / Shift / Meta elsewhere).

Cause

KeybindingPill in apps/web/src/components/settings/KeybindingsSettings.tsx formats raw shortcutToKeybindingParts(shortcut) tokens with an incomplete inline ternary instead of sharing formatShortcutLabel's key-part formatter from apps/web/src/keybindings.ts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions