Back to compare picker

Keyboard shortcut vs Command palette vs Menu / menubar vs Toolbar vs Undo vs Redo

Use a keyboard shortcut for a direct key combination that invokes one known command. Use command palette for searchable command discovery, menu menubar for persistent command grouping, toolbar for visible view-scoped controls, and undo or redo for edit-history semantics.

Learn the decision

Match the interaction to the person's task

Use a keyboard shortcut for a direct key combination that invokes one known command. Use command palette for searchable command discovery, menu menubar for persistent command grouping, toolbar for visible view-scoped controls, and undo or redo for edit-history semantics.

Keyboard shortcut

Use it when: Users repeat a known command often enough that memorized keyboard acceleration saves meaningful time.

Make this state clear: Visible command with shortcut hint.

Observe the result: A user presses Command+S in an editor, sees Saving then Saved, focus remains in the editor, and the same Save command remains available in the toolbar and menu.

Study the full pattern →

Command palette

Use it when: Users need to traverse a broad product surface quickly.

Make this state clear: Closed state with discoverable trigger.

Observe the result: Keyboard shortcut or visible trigger opens the palette, focus lands in the command input, arrows move the active row, and Enter activates the highlighted safe command.

Study the full pattern →

Menu / menubar

Use it when: A complex application or editor has many stable commands organized into known groups.

Make this state clear: Persistent closed menubar state with labelled top-level command groups.

Observe the result: A user tabs into File, presses Right Arrow to Edit, Down Arrow to open Edit commands, arrows to Undo, activates it, and focus returns to the editor canvas.

Study the full pattern →

Toolbar

Use it when: A view, editor, canvas, media surface, table, or selection needs repeated related commands close to the work area.

Make this state clear: Default toolbar with label, visible scope, grouped controls, and focusable entry point.

Observe the result: A keyboard user tabs once into the editor toolbar, uses Right Arrow to move from Bold to Italic, presses Space to toggle Italic, and focus remains in the toolbar while selected text stays selected.

Study the full pattern →

Undo

Use it when: The action is common and mistakes are likely.

Make this state clear: Normal state before the user action.

Observe the result: Undo restores the deleted task to the list and reports Quarterly report restored.

Study the full pattern →

Redo

Use it when: Users perform reversible sequences of edits and can undo too far.

Make this state clear: Undo-available state after a reversible edit.

Observe the result: A user moves a heading, chooses Undo, sees Redo move heading become available, and redoes the same move against the same document outline.

Study the full pattern →

Practice the judgment: Imagine this situation: A hidden shortcut is the only way to save, submit, search, delete, or navigate to an important area. Write the person's goal, choose one of these patterns, and show the state that helps the person continue. Use the decision rules and source trail below to explain your choice.

Review the underlying principle →

Decision dimensions

Dimension Keyboard shortcutCommand paletteMenu / menubarToolbarUndoRedo
UI or UX UI + UX - Direct key combination that activates a known command, focus target, or modeUI + UX - Modal command surfaceUI + UX - Persistent composite command bar with menus and submenusUI + UX - View-scoped command strip for related controlsUX - Post-action recovery behaviorUX - Forward edit-history replay
UI guidance Render keyboard shortcuts as discoverable command hints near the visible command, in shortcut help, in menus or toolbars when space allows, and in platform-specific form such as Command+S on macOS and Control+S on Windows.Render a compact dialog-like command surface with a search input, current scope, typed command mode, active result, command metadata, and empty state.Render a labelled command menubar with stable top-level command groups, visible focused item, open submenu, menu items, checked items, disabled items, separators, shortcut hints, and nested submenu indicators.Render a toolbar as a labelled command region attached to the view, editor, canvas, table, or selected object it controls, with grouped buttons, toggle buttons, menu buttons, separators, compact inputs, overflow, and current state visible where relevant.Show a named recovery affordance after the completed action, such as Undo delete for a specific task, near the result or in a consistent status region.Show Redo as a visible command, menu item, toolbar control, or command-palette row whose enabled state matches the current redo stack.
UX guidance Use keyboard shortcuts as accelerators for frequent, reversible, well-understood commands that already have visible controls or reachable command surfaces.Accelerate expert navigation and repeated actions across a large product while preserving ordinary navigation for novice and low-frequency users.Use a menu or menubar when users benefit from a stable command system that organizes many related functions into predictable groups such as File, Edit, View, Insert, and Format.Help the person reach a clear task outcome.Let users move quickly through frequent reversible actions, then recover from mistakes after seeing the result.Help the person reach a clear task outcome.
Good UI A document editor Save button shows Command+S on macOS and Control+S on Windows, disables the shortcut while a blocking validation dialog is open, and announces Saved draft.Centered command surface with input, shortcut hint, scope chip, grouped commands, command type labels, and a visible active row.A document editor exposes File, Edit, View, and Insert as a persistent menubar, with Save, Rename, Export, Undo, Paste unavailable, Show comments checked, and Theme as a nested submenu.A document editor toolbar labels the current document, groups Undo and Redo, formatting toggles, alignment controls, Insert link, and More, with Bold shown pressed for the selected text.Deleting Quarterly report removes it from the list and shows a recovery panel saying Quarterly report deleted with an Undo task button.A document toolbar shows Undo and Redo; Redo is disabled until the user undoes Move Summary before Risk.
Bad UI A global D key deletes records while users type in comments or dictate with speech input.Huge branded modal that buries the input below decorative content.A marketing site header marks Home, Products, Blog, Pricing, and Sign out as a menubar but behaves like normal links.Overflow hides essential commands or changes command order unpredictably.Undo action disappears before users can activate it.Redo silently replays against the wrong selected object.
Good UX A user presses Command+S in an editor, sees Saving then Saved, focus remains in the editor, and the same Save command remains available in the toolbar and menu.Keyboard shortcut or visible trigger opens the palette, focus lands in the command input, arrows move the active row, and Enter activates the highlighted safe command.A user tabs into File, presses Right Arrow to Edit, Down Arrow to open Edit commands, arrows to Undo, activates it, and focus returns to the editor canvas.A keyboard user tabs once into the editor toolbar, uses Right Arrow to move from Bold to Italic, presses Space to toggle Italic, and focus remains in the toolbar while selected text stays selected.Undo restores the deleted task to the list and reports Quarterly report restored.A user moves a heading, chooses Undo, sees Redo move heading become available, and redoes the same move against the same document outline.
Bad UX A speech input user says a sentence containing g and d, triggering global shortcuts that navigate away and delete a draft.Palette is the only way to reach important navigation.A user presses Escape from a submenu and focus jumps to the browser chrome instead of the parent menu item or editor context.A keyboard user must tab through twenty toolbar buttons before reaching the editor body.The UI promises undo for a side effect that has already notified external recipients.A user undoes a move, selects a different heading, presses Redo, and the product applies the old operation to the wrong target.
Best fit Users repeat a known command often enough that memorized keyboard acceleration saves meaningful time.Users need to traverse a broad product surface quickly.A complex application or editor has many stable commands organized into known groups.A view, editor, canvas, media surface, table, or selection needs repeated related commands close to the work area.The action is common and mistakes are likely.Users perform reversible sequences of edits and can undo too far.
Avoid when The command is rare, novice-oriented, high-risk, or hard to explain before execution.The app has only a few obvious actions.The interface is ordinary site or product navigation.There are only one or two actions that should be ordinary buttons.Recovery would restore only part of the user's lost work.The action has irreversible external side effects.
Required state Visible command with shortcut hint.Closed state with discoverable trigger.Persistent closed menubar state with labelled top-level command groups.Default toolbar with label, visible scope, grouped controls, and focusable entry point.Normal state before the user action.Undo-available state after a reversible edit.
Accessibility burden Make all shortcut outcomes available through visible controls or reachable command surfaces.Use dialog semantics with a clear name and modal behavior when the rest of the page is inert.Use role menubar for a persistent application command bar and role menu for submenus.Use role toolbar only for a cohesive group of controls whose grouping helps users, and give each toolbar a clear accessible name.Make the undo control keyboard reachable and programmatically identifiable.Expose Redo as a named button, menu item, or command row when editing commands are visible.
Common misuse Making a shortcut the only path to a primary command.Hiding basic navigation behind a keyboard-only palette.Using role menubar for a normal website header or product navigation row.Using a toolbar for primary app navigation or unrelated destinations.Restoring only part of the prior state while implying full recovery.Leaving redo enabled after a new edit invalidates the undone future.

Keyboard shortcut

UI or UX
UI + UX - Direct key combination that activates a known command, focus target, or mode
UI guidance
Render keyboard shortcuts as discoverable command hints near the visible command, in shortcut help, in menus or toolbars when space allows, and in platform-specific form such as Command+S on macOS and Control+S on Windows.
UX guidance
Use keyboard shortcuts as accelerators for frequent, reversible, well-understood commands that already have visible controls or reachable command surfaces.
Good UI
A document editor Save button shows Command+S on macOS and Control+S on Windows, disables the shortcut while a blocking validation dialog is open, and announces Saved draft.
Bad UI
A global D key deletes records while users type in comments or dictate with speech input.
Good UX
A user presses Command+S in an editor, sees Saving then Saved, focus remains in the editor, and the same Save command remains available in the toolbar and menu.
Bad UX
A speech input user says a sentence containing g and d, triggering global shortcuts that navigate away and delete a draft.
Best fit
Users repeat a known command often enough that memorized keyboard acceleration saves meaningful time.
Avoid when
The command is rare, novice-oriented, high-risk, or hard to explain before execution.
Required state
Visible command with shortcut hint.
Accessibility burden
Make all shortcut outcomes available through visible controls or reachable command surfaces.
Common misuse
Making a shortcut the only path to a primary command.

Command palette

UI or UX
UI + UX - Modal command surface
UI guidance
Render a compact dialog-like command surface with a search input, current scope, typed command mode, active result, command metadata, and empty state.
UX guidance
Accelerate expert navigation and repeated actions across a large product while preserving ordinary navigation for novice and low-frequency users.
Good UI
Centered command surface with input, shortcut hint, scope chip, grouped commands, command type labels, and a visible active row.
Bad UI
Huge branded modal that buries the input below decorative content.
Good UX
Keyboard shortcut or visible trigger opens the palette, focus lands in the command input, arrows move the active row, and Enter activates the highlighted safe command.
Bad UX
Palette is the only way to reach important navigation.
Best fit
Users need to traverse a broad product surface quickly.
Avoid when
The app has only a few obvious actions.
Required state
Closed state with discoverable trigger.
Accessibility burden
Use dialog semantics with a clear name and modal behavior when the rest of the page is inert.
Common misuse
Hiding basic navigation behind a keyboard-only palette.

Menu / menubar

UI or UX
UI + UX - Persistent composite command bar with menus and submenus
UI guidance
Render a labelled command menubar with stable top-level command groups, visible focused item, open submenu, menu items, checked items, disabled items, separators, shortcut hints, and nested submenu indicators.
UX guidance
Use a menu or menubar when users benefit from a stable command system that organizes many related functions into predictable groups such as File, Edit, View, Insert, and Format.
Good UI
A document editor exposes File, Edit, View, and Insert as a persistent menubar, with Save, Rename, Export, Undo, Paste unavailable, Show comments checked, and Theme as a nested submenu.
Bad UI
A marketing site header marks Home, Products, Blog, Pricing, and Sign out as a menubar but behaves like normal links.
Good UX
A user tabs into File, presses Right Arrow to Edit, Down Arrow to open Edit commands, arrows to Undo, activates it, and focus returns to the editor canvas.
Bad UX
A user presses Escape from a submenu and focus jumps to the browser chrome instead of the parent menu item or editor context.
Best fit
A complex application or editor has many stable commands organized into known groups.
Avoid when
The interface is ordinary site or product navigation.
Required state
Persistent closed menubar state with labelled top-level command groups.
Accessibility burden
Use role menubar for a persistent application command bar and role menu for submenus.
Common misuse
Using role menubar for a normal website header or product navigation row.

Toolbar

UI or UX
UI + UX - View-scoped command strip for related controls
UI guidance
Render a toolbar as a labelled command region attached to the view, editor, canvas, table, or selected object it controls, with grouped buttons, toggle buttons, menu buttons, separators, compact inputs, overflow, and current state visible where relevant.
UX guidance
Help the person reach a clear task outcome.
Good UI
A document editor toolbar labels the current document, groups Undo and Redo, formatting toggles, alignment controls, Insert link, and More, with Bold shown pressed for the selected text.
Bad UI
Overflow hides essential commands or changes command order unpredictably.
Good UX
A keyboard user tabs once into the editor toolbar, uses Right Arrow to move from Bold to Italic, presses Space to toggle Italic, and focus remains in the toolbar while selected text stays selected.
Bad UX
A keyboard user must tab through twenty toolbar buttons before reaching the editor body.
Best fit
A view, editor, canvas, media surface, table, or selection needs repeated related commands close to the work area.
Avoid when
There are only one or two actions that should be ordinary buttons.
Required state
Default toolbar with label, visible scope, grouped controls, and focusable entry point.
Accessibility burden
Use role toolbar only for a cohesive group of controls whose grouping helps users, and give each toolbar a clear accessible name.
Common misuse
Using a toolbar for primary app navigation or unrelated destinations.

Undo

UI or UX
UX - Post-action recovery behavior
UI guidance
Show a named recovery affordance after the completed action, such as Undo delete for a specific task, near the result or in a consistent status region.
UX guidance
Let users move quickly through frequent reversible actions, then recover from mistakes after seeing the result.
Good UI
Deleting Quarterly report removes it from the list and shows a recovery panel saying Quarterly report deleted with an Undo task button.
Bad UI
Undo action disappears before users can activate it.
Good UX
Undo restores the deleted task to the list and reports Quarterly report restored.
Bad UX
The UI promises undo for a side effect that has already notified external recipients.
Best fit
The action is common and mistakes are likely.
Avoid when
Recovery would restore only part of the user's lost work.
Required state
Normal state before the user action.
Accessibility burden
Make the undo control keyboard reachable and programmatically identifiable.
Common misuse
Restoring only part of the prior state while implying full recovery.

Redo

UI or UX
UX - Forward edit-history replay
UI guidance
Show Redo as a visible command, menu item, toolbar control, or command-palette row whose enabled state matches the current redo stack.
UX guidance
Help the person reach a clear task outcome.
Good UI
A document toolbar shows Undo and Redo; Redo is disabled until the user undoes Move Summary before Risk.
Bad UI
Redo silently replays against the wrong selected object.
Good UX
A user moves a heading, chooses Undo, sees Redo move heading become available, and redoes the same move against the same document outline.
Bad UX
A user undoes a move, selects a different heading, presses Redo, and the product applies the old operation to the wrong target.
Best fit
Users perform reversible sequences of edits and can undo too far.
Avoid when
The action has irreversible external side effects.
Required state
Undo-available state after a reversible edit.
Accessibility burden
Expose Redo as a named button, menu item, or command row when editing commands are visible.
Common misuse
Leaving redo enabled after a new edit invalidates the undone future.
Decision rules
  • Choose keyboard shortcut when one memorized key combination directly invokes one command, focuses one surface, or toggles one mode without opening a command browser.
  • Choose command palette when users need searchable command discovery through search, ranking, filtering, or browsing many commands before executing one result with clear scope.
  • Choose menu menubar when commands need stable visible grouping, submenu ownership, disabled or checked menu item state, and desktop-style arrow navigation.
  • Choose toolbar when repeated view-scoped controls should stay visible beside the editor, canvas, table, media view, or selected object they affect.
  • Choose undo when the design problem is reversing the most recent operation and preserving edit-history semantics across visible controls and shortcuts.
  • Choose redo when the design problem is reapplying an undone operation while edit-history semantics and the history branch are still valid.
  • Keyboard shortcut must define command name, key chord, platform variant, scope, conflict rule, visible hint, aria-keyshortcuts exposure where appropriate, enabled state, disabled reason, confirmation or undo for risky commands, and a remapping or disable path for character-key shortcuts.
  • Keyboard shortcuts must not replace visible commands, navigation, menus, buttons, or focus traversal for primary workflows; they accelerate paths that remain available by other means.
  • Do not bind single-character shortcuts globally unless users can turn them off, remap them, or use them only while a relevant component has focus.
  • Resolve shortcut conflicts against browser, operating-system, screen reader, text editing, form field, command palette, menubar, toolbar, undo, redo, and product-level command maps before shipping.
Inspect live examples
Failure modes
  • A hidden shortcut is the only way to save, submit, search, delete, or navigate to an important area.
  • Control+S is shown on macOS instead of Command+S, or platform variants are missing from shortcut help.
  • A single-letter global shortcut fires while a speech input user dictates or while a text field is active.
  • The shortcut hint says Delete but the key command archives, moves, or triggers an irreversible side effect.
  • Disabled shortcuts still fire because the keyboard handler ignores current command availability.
  • The command palette, toolbar, and menu show different shortcuts for the same command.
  • A risky shortcut runs without confirmation, undo, review, or a status message naming the affected object.

Saved items