Skip to content

The command palette shows each command's mnemonic, and finds a command by it #341

Description

@a-team-app

Context

Second slice of #290: the command palette (Ctrl+E) is the door people reach for first, but it never shows a command's mnemonic, so it can't teach the faster route, and nothing lets you search mnemonics (the mnemonic dialog reads every key as part of a mnemonic). This adds a Mnemonic column to the palette and lets its filter match it. See the palette mockup in the pitch. Independent of the menu bar.

Acceptance criteria

  • In the command palette (Ctrl+E, a TextField filter over a ListView), each row shows the label, the keys, and the command's mnemonic as the rightmost column. A command with no mnemonic leaves that column blank.
  • The Mnemonic column lines up down the list and stays readable at a narrow terminal width (the label truncates before the mnemonic does).
  • Typing sf in the filter lists Save active editor; typing sao lists Select all occurrences (when an editor has focus). Filtering by label or key still works as before.
  • Running a row, Esc, and which commands the palette lists where you are are all unchanged.
  • Settings › Keyboard Shortcuts and the mnemonic dialog (Ctrl+Space) are unchanged.

Tests

  • Rows carry the mnemonic from the one mnemonic table (not a copy), blank when a command has none.
  • The filter matches on mnemonic, label and keys; a mnemonic query finds the right command.
  • Column layout at a narrow width keeps the mnemonic visible.

Out of scope

  • Mnemonics in Settings › Keyboard Shortcuts, or in the menu bar.
  • Changing any mnemonic or label, or the palette's scope filtering.
  • Ranking results (e.g. an exact mnemonic match first). Filter only.

Activity

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

    a-team:devClaimed by the a-team Dev

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions