Keyboard shortcut

Also called hotkey or keybinding

A key combination that runs an action directly, like ⌘S to save or ⌘K to open search, so frequent users can skip the mouse.

What is Keyboard shortcut?

Keyboard shortcuts let people act without reaching for the mouse: ⌘S (Ctrl+S on Windows) saves, ⌘K opens search or a command palette, ⌘B makes text bold, and Esc closes whatever is open. They make an app faster for the people who use it every day.

Follow the conventions people already know before inventing new ones, and make shortcuts easy to discover: show them next to menu items and in tooltips, and list them all in a help panel, often opened with ?. Show ⌘ on a Mac and Ctrl everywhere else.

When building them, check metaKey on a Mac and ctrlKey elsewhere, call preventDefault() only for the combinations you handle, and ignore single-key shortcuts while focus is in a text field so typing doesn’t trigger them. Avoid combinations the browser or operating system keeps for itself, such as ⌘W and ⌘Q.

Often confused with

Command palette
A command palette is a searchable list of actions, often opened with ⌘K. A keyboard shortcut is any key combination that runs an action directly.
All terms

Command palette

A search box that opens with a shortcut like ⌘K and lets you find and run any command or page by typing a few letters.

Focus ring

An outline that marks which element has keyboard focus, so people moving through a page with the Tab key can see where they are.

Tooltip

A small label that appears next to an element when you hover over it or focus it, naming an icon button or adding a short hint.

Interaction states

The set of looks a control takes as people use it, such as default, hover, pressed, focused, and disabled, each showing what will happen.