# Keyboard shortcuts

> Every keyboard shortcut in the spreadsheet, matching Excel for Windows. On macOS, Cmd works wherever Ctrl is listed.

The grid uses the WAI-ARIA grid pattern: one tab stop, with arrow keys inside. Dialogs are modal. They trap `Tab`, close on `Escape` and return focus to the grid. On macOS, `Cmd` works wherever `Ctrl` is listed.

## Moving and selecting

| Keys | Action |
| --- | --- |
| Arrow keys | Move one cell |
| `Ctrl` + arrow | Jump to the edge of the data region |
| `Shift` + arrow, `Ctrl` + `Shift` + arrow | Extend the selection |
| `Home`, `Ctrl` + `Home`, `Ctrl` + `End` | Start of row, first cell, last used cell |
| `Shift` + `Home` | Extend the selection to the start of the row |
| `PageUp`, `PageDown` | Move one screen. With `Shift`, extend the selection by one screen |
| `Ctrl` + `PageUp`, `Ctrl` + `PageDown` | Previous or next sheet |
| `Ctrl` + `A` | Current region, then the whole sheet |
| `Ctrl` + `Space`, `Shift` + `Space` | Select columns, select rows |
| `Tab`, `Shift` + `Tab`, `Enter`, `Shift` + `Enter` | Move inside a selection. On a protected sheet that only allows unlocked cells, `Tab` cycles through them |
| `Ctrl` + `[`, `Ctrl` + `]` | Select direct precedents, select direct dependents |

## Editing

| Keys | Action |
| --- | --- |
| Typing | Replace the cell's contents |
| `F2` | Edit in place, or switch between Enter and Edit mode while editing |
| `Enter`, `Tab` | Commit and move |
| `Ctrl` + `Enter` | Commit to every selected cell |
| `Alt` + `Enter` | New line in the cell |
| `Escape` | Cancel the edit. In the grid, clear the copy outline or turn the format painter off |
| `F4` | Cycle `$` markers in the reference at the caret |
| `Delete`, `Backspace` | Clear contents, or clear and start editing |
| `Ctrl` + `D`, `Ctrl` + `R` | Fill down, fill right |
| `Ctrl` + `;`, `Ctrl` + `Shift` + `;` | Insert today's date, insert the current time |
| `Alt` + `=` | AutoSum: propose `SUM` over the numbers above or to the left. With a range selected, add totals |
| `Alt` + `↓` | Open the validation list of the cell, or a pick list of the text entries in its column |
| `F4` | Open the list of a [dropdown cell](https://docs.birchui.com/spreadsheet/formatting.md#cell-controls) |
| `Space` | Toggle the selected [checkboxes](https://docs.birchui.com/spreadsheet/formatting.md#cell-controls); on other cells it starts typing |
| `Ctrl` + `Z`, `Ctrl` + `Y`, `Ctrl` + `Shift` + `Z` | Undo, redo |
| `Ctrl` + `C`, `Ctrl` + `X`, `Ctrl` + `V` | Copy, cut, paste |
| `Ctrl` + `+`, `Ctrl` + `-` | With whole rows or columns selected: insert or delete them. With cells selected: open **Insert cells** or **Delete cells** to choose the shift |

## Formatting

| Keys | Action |
| --- | --- |
| `Ctrl` + `1` | Format Cells dialog |
| `Ctrl` + `B`, `Ctrl` + `I`, `Ctrl` + `U`, `Ctrl` + `5` | Bold, italic, underline, strikethrough |
| `Ctrl` + `Shift` + `~` | General format |
| `Ctrl` + `Shift` + `!` | Number with two decimals and a thousands separator |
| `Ctrl` + `Shift` + `@` | Time |
| `Ctrl` + `Shift` + `#` | Date (`d-mmm-yy`) |
| `Ctrl` + `Shift` + `$` | Currency |
| `Ctrl` + `Shift` + `%` | Percentage |
| `Ctrl` + `Shift` + `^` | Scientific |
| `Ctrl` + `Shift` + `&`, `Ctrl` + `Shift` + `_` | Outline border, remove borders |

## Data, structure and tools

| Keys | Action |
| --- | --- |
| `Ctrl` + `Shift` + `L` | Turn the filter on or off |
| `Ctrl` + `T`, `Ctrl` + `L` | Create a table |
| `Ctrl` + `K` | Insert or edit a hyperlink |
| `Shift` + `F2` | Add or edit a note |
| `Alt` + `Shift` + `→`, `Alt` + `Shift` + `←` | Group or ungroup the selected rows, or columns when whole columns are selected |
| `Ctrl` + `F3` | Name Manager |
| `Ctrl` + `F`, `Ctrl` + `H` | Find, find and replace |
| `Ctrl` + `` ` `` | Show formulas instead of values |
| `Ctrl` + `P` | Print |
| `Shift` + `F10`, context menu key | Cell menu |
| `Alt` + `Shift` + `F10` | Error checking menu of a marked cell |
| `F7` | Spelling, when a `spellcheck` function is set |
| `Ctrl` + `Alt` + `M` | New comment on the active cell |
| `Ctrl` + `Alt` + `V` | Paste special |
| `Ctrl` + `Shift` + `V` | Paste values only |
| `Ctrl` + `G`, `F5` | Go to; **Special…** selects blanks, formulas, errors, visible cells and more |
| `Ctrl` + `Alt` + `C`, `Ctrl` + `Alt` + `Shift` + `C` | Format painter on or off, or locked on. Move the selection and press `Enter` to apply. |
| `Ctrl` + `9`, `Ctrl` + `Shift` + `9` | Hide the selected rows, unhide rows in the selection |
| `Ctrl` + `0`, `Ctrl` + `Shift` + `0` | Hide the selected columns, unhide columns in the selection |
| `Ctrl` + `Alt` + `=`, `Ctrl` + `Alt` + `-`, `Ctrl` + `Alt` + `0` | Zoom in, zoom out, back to 100% |
| `Ctrl` + mouse wheel | Zoom in or out |

All dialogs can also be opened from code with `openDialog(name)`, using one of `formatCells`, `nameManager`, `cellStyles`, `note`, `hyperlink`, `evaluateFormula`, `pageSetup`, `createTable`, `find`, `replace`, `pasteSpecial`, `sort`, `removeDuplicates`, `textToColumns`, `subtotal`, `goalSeek`, `dataTable`, `dataValidation`, `conditionalFormat`, `insertFunction`, `insertPivotTable`, `pivotFields`, `insertChart`, `formatChart` (for the selected chart), `saveSheetView`, `spelling`, `insertSparkline`, `comments`, `notes`, `protectSheet`, `importReport`, `documentProperties`, `insertObject` (the file picker of **Insert > Object**) or `objectProperties` (for the selected embedded file).

## Sheet tabs

These keys work when a sheet tab has focus. `F6` moves focus to the tab bar.

| Keys | Action |
| --- | --- |
| `←` `→` | Previous or next sheet, wrapping around |
| `Home`, `End` | First or last visible sheet |
| `F2` | Rename the sheet. `Enter` saves, `Escape` cancels |
| `Delete` | Delete the sheet |
| `Shift` + `F10`, context menu key | Tab menu: Rename, Delete, Duplicate, Tab color…, Hide, Unhide, Move left, Move right |

## Toolbar, panels and regions

| Keys | Action |
| --- | --- |
| `Alt` + `F`, `H`, `N`, `P`, `M`, `A`, `R`, `W` | Open the File, Home, Insert, Page Layout, Formulas, Data, Review or View tab of the [ribbon](https://docs.birchui.com/spreadsheet/toolbar.md) |
| `Alt` + `Q` | Focus the [command search](https://docs.birchui.com/spreadsheet/toolbar.md#command-search) box of the ribbon |
| `Ctrl` + `F1` | Collapse the [ribbon](https://docs.birchui.com/spreadsheet/toolbar.md#ribbon-height-classic-single-line-tabs-only) to its tabs, or bring it back |
| `F6`, `Shift` + `F6` | Move between the panes of a [split](https://docs.birchui.com/spreadsheet/sheets.md#split-panes), then the grid, the side panel, the sheet tabs, the status bar, the ribbon and the formula bar |
| `←` `→`, `Home`, `End` | Move between ribbon tabs, or between commands inside the toolbar |
| `↓` on a ribbon tab, `↑` in the toolbar | Move from the tab to its commands, and back |
| `Escape` in the ribbon or a side panel | Return to the grid |

The outline gutter is one tab stop: arrow keys, `Home` and `End` move between the level buttons and the +/- toggles, and `Enter` or `Space` collapses or expands. The freeze-pane bars are focusable separators: arrow keys change the number of frozen rows or columns, and `Home` unfreezes.

Shortcuts for objects are listed with them: [shapes](https://docs.birchui.com/spreadsheet/shapes.md#editing-with-the-keyboard), [slicers](https://docs.birchui.com/spreadsheet/slicers.md#using-a-slicer) and the [pivot field list](https://docs.birchui.com/spreadsheet/pivot-tables.md#the-field-list).
