Skip to content

associated keyboard shortcut for context menu items #9739

@maribethb

Description

@maribethb

Check for duplicates

  • I have searched for similar issues before opening a new one.

Problem

some context menu items also have shortcut items associated with them, and in those cases we want to display the keyboard shortcut in the menu. to make the process of creating the context menu easier, we can add an api to associate the context menu item with a keyboard shortcut

Request

  • add an optional associatedKeyboardShortcut to ContextMenuItem interface (feel free to debate name)
  • should be a string, the name of a keyboard shortcut as it exists in the registry
  • if the kb shortcut does not exist in the registry at the time we access the shortcut name, then log a warning but then otherwise proceed as if the property were undefined
  • in the context menu creation, move the logic that currently adds the keyboard shortcut combination to the display text to check if there is an associated keyboard shortcut or not, and if so display the preferred key combination (see utility to figure out the "preferred" key chord to show for a given keyboard shortcut #9740)
  • update the relevant context menu items in core to associate their keyboard shortcuts

Alternatives considered

No response

Additional context

No response

Metadata

Metadata

Assignees

Labels

issue: feature requestDescribes a new feature and why it should be added

Type

No type

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions