Skip to content

Keyboard shortcuts

Access all Handsontable DataGrid features using just your keyboard. Use shortcuts you know from Google Sheets or Microsoft Excel.

Overview

This page lists all of Handsontable’s default keyboard shortcuts.

To register these keys with addShortcut(), use key-name strings instead of display glyphs. For example, use control/meta for ⌘ and ArrowLeft for ←. For the full naming convention, see custom shortcuts.

These keyboard shortcuts work when you navigate the grid. They come from Handsontable’s Core, so they work out of the box, with no need for additional plugins.

By default, Tab moves the active cell one column to the right and Shift+Tab moves it one column to the left - matching standard spreadsheet navigation in Excel and Google Sheets. This behavior is controlled by the tabMoves option (default: { row: 0, col: 1 }) and can be customized. In a right-to-left layout, Tab moves the active cell to the next column, which is one cell to the left. For more details, see Keyboard navigation in RTL mode.

WindowsmacOSActionExcelSheets
Arrow keysArrow keysMove one cell up, down, left, or right✓✓
Ctrl+Backspace⌘+BackspaceScroll the viewport to show the focused cell or header✗✓
Ctrl+↑⌘+↑Move to the first cell of the current column✓✓
Ctrl+↓⌘+↓Move to the last cell of the current column✓✓
Ctrl+←⌘+←Move to the leftmost cell of the current row**✓✓
Ctrl+→⌘+→Move to the rightmost cell of the current row**✓✓
F2F2Enter the editing mode of the active cell✓✓
EnterEnterEnter the editing mode of the active cell✗✓
Shift+Enter⇧+EnterEnter the editing mode of the active cell✗✓
Ctrl+Shift+Enter⌘+⇧+EnterSave and close editor✓✓
Alphanumeric keysAlphanumeric keysEnter the editing mode of the active cell and enter the pressed key’s value into the cell✓✓
TabTabMove to the next cell to the right by default* (in RTL layout, the next cell is to the left; if there’s only one column available, move one cell down) — direction set by tabMoves✓✓
Shift+Tab⇧+TabMove to the previous cell to the left by default* (in RTL layout, the previous cell is to the right; if there’s only one column available, move one cell up) — direction set by tabMoves✓✓
HomeHomeMove to the first non-frozen cell of the current row*✓✓
Ctrl+Home⌘+HomeMove to the first non-frozen cell of the grid*✗✓
EndEndMove to the last non-frozen cell of the current row*✗✓
Ctrl+End⌘+EndMove to the last non-frozen cell of the grid*✗✓
Page UpPage UpMove one screen up✓✓
Page DownPage DownMove one screen down✓✓
Alt+Enter⌥+EnterOpen the link of the selected cell (when the cell renders a link, for example through autoLink or formulas.hyperlinks)✗✗

* This action depends on your layout direction.
** On a row header of a grid with row groups, this shortcut works as a row group key instead.

Selection keyboard shortcuts

These keyboard shortcuts help you select cells. They come from Handsontable’s Core, so they work out of the box, with no need for additional plugins.

WindowsmacOSActionExcelSheets
Ctrl+A⌘+ASelect all cells✓✓
Ctrl+Shift+Space⌘+⇧+SpaceSelect all cells and headers✓✓
Ctrl+Space⌃+SpaceSelect the entire column*✓✓
Shift+Space⇧+SpaceSelect the entire row✓✓
Ctrl+Shift+↑⌘+⇧+↑Extend the selection to the first cell of the current column**✓✓
Ctrl+Shift+↓⌘+⇧+↓Extend the selection to the last cell of the current column**✓✓
Ctrl+Shift+←⌘+⇧+←Extend the selection to the leftmost cell of the current row**✓✓
Ctrl+Shift+→⌘+⇧+→Extend the selection to the rightmost cell of the current row**✓✓
Shift + Arrow keys⇧ + Arrow keysExtend the selection by one cell✓✓
Shift+Home⇧+HomeExtend the selection to the first non-frozen cell of the current row***✓✗
Shift+End⇧+EndExtend the selection to the last non-frozen cell of the current row***✗✗
Shift+Page Up⇧+Page UpExtend the selection by one screen up✓✓
Shift+Page Down⇧+Page DownExtend the selection by one screen down✓✓
Ctrl+Enter⌘+EnterFill all the selected cells with the value of the active cell****✗✓
DeleteDeleteClear the contents of the selected cells✓✓
BackspaceBackspaceClear the contents of the selected cells✓✓

* Does not work on macOS with multiple keyboard layouts. To work around this issue, add Fn to the key combination.
** In case of multiple selection layers, only the last selection layer gets extended.
*** This action depends on your layout direction.
**** This action works only when your selection holds at least one other cell you can edit, across any selection layer. The active highlight must be on a cell, not on a row header, column header, or corner.

Edition keyboard shortcuts

These keyboard shortcuts work when you’re editing a cell’s contents. They come from Handsontable’s Core, so they work out of the box, with no need for additional plugins.

WindowsmacOSActionExcelSheets
Arrow keysArrow keysMove the cursor through the text✓✓
Alphanumeric keysAlphanumeric keysEnter the pressed key’s value into the cell✓✓
EnterEnterComplete the cell entry and move to the cell below✓✓
Shift+Enter⇧+EnterComplete the cell entry and move to the cell above✓✓
TabTabComplete the cell entry and move to the next cell (right by default, left in RTL layout)* — direction set by tabMoves✓✓
Shift+Tab⇧+TabComplete the cell entry and move to the previous cell (left by default, right in RTL layout)* — direction set by tabMoves✓✓
DeleteDeleteDelete one character after the cursor*✓✓
BackspaceBackspaceDelete one character before the cursor*✓✓
HomeHomeMove the cursor to the beginning of the text*✓✓
EndEndMove the cursor to the end of the text*✓✓
Ctrl + Arrow keys⌘ + Arrow keysMove the cursor to the beginning or to the end of the text✓✓
Ctrl+Shift + Arrow keys⌘+⇧ + Arrow keysExtend the selection to the beginning or to the end of the text✓✓
Page UpPage UpComplete the cell entry and move one screen up✓✓
Page DownPage DownComplete the cell entry and move one screen down✓✓
Alt+Enter⌥+EnterInsert a line break✗✓
Ctrl+Enter⌃/⌘+EnterInsert a line break**✗✓
EscapeEscapeCancel the cell entry and exit the editing mode✓✓

* This action depends on your layout direction.
** This action inserts a line break only when the shortcut has no other cell to write to. If your selection holds any other cell you can edit, across any selection layer, this shortcut saves the edited value into all of those cells instead.

Checkbox editor keyboard shortcuts

These keyboard shortcuts work in the checkbox cell editor.

WindowsmacOSActionExcelSheets
SpaceSpaceCheck or uncheck the checkbox✗✓
EnterEnterCheck or uncheck the checkbox✗✓
DeleteDeleteUncheck the checkbox✗✓
BackspaceBackspaceUncheck the checkbox✗✓

handsontable editor keyboard shortcuts

These keyboard shortcuts work in the handsontable cell editor.

WindowsmacOSActionExcelSheets
↑↑Move to the cell above the active cell✗✗
↓↓Move to the cell below the active cell✗✗

Select editor keyboard shortcuts

These keyboard shortcuts work in the select cell editor.

WindowsmacOSActionExcelSheets
↑↑Select the previous option✗✗
↓↓Select the next option✗✗

Autocomplete editor keyboard shortcuts

The autocomplete cell editor uses the same keyboard shortcuts as the handsontable editor. In strict mode, a few of these shortcuts behave differently — see Autocomplete strict mode.

The dropdown cell editor is an autocomplete editor with strict mode always on, so it uses the same keyboard shortcuts as Autocomplete strict mode.

MultiSelect editor keyboard shortcuts

These keyboard shortcuts work in the multiselect cell editor.

WindowsmacOSActionExcelSheets
↑ / ↓↑ / ↓Move the focus between items in the dropdown list✗✗
SpaceSpaceToggle the selection of the focused item✗✗
EnterEnterToggle the focused item’s selection, or close the editor and commit the selection, depending on the enterCommits option✗✗

For the full behavior, including how searchInput affects initial focus, see Keyboard navigation.

Numeric editor keyboard shortcuts

The numeric cell editor is a text editor, so it uses the standard edition keyboard shortcuts above. It has no numeric-specific key bindings.

Date editor keyboard shortcuts

The intl-date/date cell editor opens the browser’s native date picker. Keyboard navigation inside the picker comes from the browser, so it varies between browsers and operating systems.

Time editor keyboard shortcuts

The intl-time/time cell editor opens the browser’s native time picker. Keyboard navigation inside the picker comes from the browser, so it varies between browsers and operating systems.

Password editor keyboard shortcuts

The password cell editor is a text editor, so it uses the standard edition keyboard shortcuts above. It has no password-specific key bindings.

Plugin keyboard shortcuts

These keyboard shortcuts work with particular plugins.

Clipboard keyboard shortcuts

These keyboard shortcuts work when the CopyPaste plugin is enabled.

WindowsmacOSActionExcelSheets
Ctrl+X⌘+XCut the contents of the selected cells to the system clipboard✓✓
Ctrl+C⌘+CCopy the contents of the selected cells to the system clipboard✓✓
Ctrl+V⌘+VPaste from the system clipboard✓✓

To turn off these keyboard shortcuts, see Remove the copy, cut, and paste shortcuts.

Cell merging keyboard shortcuts

These keyboard shortcuts work when the MergeCells plugin is enabled.

WindowsmacOSActionExcelSheets
Ctrl+M⌃+MMerge or unmerge the selected cells (does nothing while several ranges are selected)✗✗

Undo and redo keyboard shortcuts

These keyboard shortcuts work when the UndoRedo plugin is enabled.

WindowsmacOSActionExcelSheets
Ctrl+Z⌘+ZUndo the last action✓✓
Ctrl+Y⌘+YRedo the last action✓✓
Ctrl+Shift+Z⌘+⇧+ZRedo the last action✓✓

Context menu keyboard shortcuts

These keyboard shortcuts work in context menus. To activate them, enable the ContextMenu plugin.

WindowsmacOSActionExcelSheets
Ctrl+Shift+\ or Shift+F10⌘+⇧+\ or ⇧+F10Open the context menu✗✓
Arrow keysArrow keysMove one available menu item up, down, left, or right✓✓
Page UpPage UpMove to the first visible item of the context menu or submenu✓✗
Page DownPage DownMove to the last visible item of the context menu or submenu✓✗
EscapeEscapeClose the context menu or submenu✓✓
EnterEnterRun the action of the selected menu item✓✗

Column groups keyboard shortcuts

These keyboard shortcuts work in column groups, also known as “nested headers”. To activate them, enable the NestedHeaders plugin.

The Shift+Alt+↑ shortcut works from a data cell or a focused column header, with or without navigableHeaders. The Enter shortcut works only when a collapsible column group header is focused. Enable navigableHeaders: true to move focus onto headers with the arrow keys. For more details, see Keyboard navigation.

WindowsmacOSActionExcelSheets
Shift+Alt+↑⇧+⌥+↑Collapse or expand the collapsible column group closest to the data, over the current column. From a focused column header, toggle that header’s group✗✗
EnterEnterCollapse or expand the column group✗✗

Row parent-child keyboard shortcuts

These keyboard shortcuts work in row groups, also known as “nested rows”. To activate them, enable the NestedRows plugin.

The Shift+Alt+→ and Shift+Alt+← shortcuts work from any data cell of the row or from its row header, with or without navigableHeaders. The other shortcuts work only when a row header is focused. Enable navigableHeaders: true to move focus onto headers with the arrow keys. For more details, see Keyboard navigation.

WindowsmacOSAction
EnterEnterCollapse or expand the row group
Ctrl+→⌘+→Expand a collapsed parent row
Ctrl+←⌘+←Collapse an expanded parent row. Otherwise, move the focus to the header of the parent row, if any
Shift+Alt+→⇧+⌥+→Expand the current row, if it is a collapsed parent row
Shift+Alt+←⇧+⌥+←Collapse the current row, if it is an expanded parent row. Otherwise, move the selection to the parent row, in the same column

In a right-to-left layout (layoutDirection: 'rtl'), the ← and → keys swap their actions. The arrow keys without a modifier move the selection, as they do in every grid. On a row header, Ctrl/⌘+← and → don’t jump to the first or last cell of the row. To move along the row from a row header, use → or End.

Rows sorting keyboard shortcuts

These keyboard shortcuts work with rows sorting. To activate them, enable the ColumnSorting, or the MultiColumnSorting plugin.

These header-focused shortcuts work only when a column header is focused. Enable navigableHeaders: true to move focus onto headers with the arrow keys. For more details, see Keyboard navigation.

WindowsmacOSActionExcelSheets
EnterEnterSort by the focused column, cycling through ascending, descending, and original order✗✗
Shift+Enter⇧+EnterAppend the focused column to the active sort criteria. Requires the MultiColumnSorting plugin.✗✗

Column menu keyboard shortcuts

These keyboard shortcuts work with the column menu. To activate them, enable the DropdownMenu plugin.

The Shift+Alt+↓ shortcut works from a data cell. The Ctrl/⌘+Enter shortcut works only when a column header is focused. Enable navigableHeaders: true to move focus onto headers with the arrow keys. For more details, see Keyboard navigation.

WindowsmacOSActionExcelSheets
Shift+Alt+↓⇧+⌥+↓Open the column menu. Works in any cell, if the respective column header displays the menu button.✗✗
Ctrl+Enter⌘+EnterOpen the column menu. Works only when a column header with the column menu button is focused.✗✗
Arrow keysArrow keysMove one available menu item up, down, left, or right.✓✓
Ctrl+↑ or Home⌘+↑ or HomeMove to the first available menu item.✓✗
Ctrl+↓ or End⌘+↓ or EndMove to the last available menu item.✓✗
Page UpPage UpMove one visible menu page up.✓✗
Page DownPage DownMove one visible menu page down.✓✗
EscapeEscapeClose the column menu or submenu.✓✓
Enter or SpaceEnter or SpaceRun the action of the selected menu item, or open its submenu.✓✗

Column filter keyboard shortcuts

These keyboard shortcuts work with the column filter. To activate them, enable the Filters plugin and the DropdownMenu plugin.

WindowsmacOSActionExcelSheets
Alt+A⌥+AClear all filters✗✗
TabTabMove focus to the next filtering component in the open filter menu.✗✗
Shift+Tab⇧+TabMove focus to the previous filtering component in the open filter menu.✗✗
↑ / ↓↑ / ↓When the filter search input is focused, move through the Filter by value list.✗✗
Enter / SpaceEnter / SpaceWhen Select all or Select none is focused, run the action.✗✗

Comments keyboard shortcuts

These keyboard shortcuts work with comments. To activate them, enable the Comments plugin.

WindowsmacOSActionExcelSheets
Ctrl+Alt+M⌃+⌥+MAdd or edit a comment✗✓
Ctrl+Enter⌘+EnterSave and exit the current comment✗✓
EscapeEscapeExit the current comment without saving✗✗
TabTabSave and exit the current comment, move the selection to the next cell✗✗
Shift + TabShift + TabSave and exit the current comment, move the selection to the previous cell✗✗

Row selection keyboard shortcuts

These keyboard shortcuts work with row selection. To activate them, enable the RowSelection plugin.

The shortcuts on a row checkbox and on the “select all” checkbox work only when that header or cell is focused. Enable navigableHeaders: true to move focus onto headers with the arrow keys. For more details, see Keyboard navigation.

WindowsmacOSActionExcelSheets
SpaceSpaceOn a data cell, toggle the cell’s row instead of opening the editor. With a range of cells selected, select every row of the range, or deselect them when all are already selected.✗✗
SpaceSpaceOn a row checkbox, toggle the row✗✗
SpaceSpaceOn the “select all” checkbox, select every row in scope, or deselect them when all are already selected✗✗

On a checkbox cell, Space keeps checking the cell. To edit a cell while row selection is enabled, use Enter or F2.

Column header checkbox keyboard shortcuts

These keyboard shortcuts work with the “check all” checkbox in the header of a checkbox column. To activate them, enable the CheckboxHeader plugin with the headerCheckbox option.

These shortcuts work only when a column header is focused. Enable navigableHeaders: true to move focus onto headers with the arrow keys. For more details, see Keyboard navigation.

WindowsmacOSActionExcelSheets
SpaceSpaceCheck every checkbox in the column, or uncheck them when all of them are already checked✗✗

Editable headers keyboard shortcuts

These keyboard shortcuts work when you rename a column header or a row header in the grid. To activate them, enable the EditableHeaders plugin with the editableHeaders option.

F2 and Enter start renaming only when a header is focused. Enable navigableHeaders: true to move focus onto headers with the arrow keys. On a header whose Enter sorts the column, Enter keeps sorting it; use F2 instead.

WindowsmacOSActionExcelSheets
F2F2Start renaming the focused header✗✗
EnterEnterStart renaming the focused header✗✗
EnterEnterSave the new header name✗✗
EscapeEscapeCancel renaming the header✗✗
TabTabSave the new header name, and move to the next header or cell✗✗
Shift+Tab⇧+TabSave the new header name, and move to the previous header or cell✗✗

Formulas keyboard shortcuts

These keyboard shortcuts work when the Formulas plugin is enabled.

WindowsmacOSActionExcelSheets
Ctrl+`⌃+`Toggle between showing formulas and showing values✓✓

Formula builder keyboard shortcuts

These keyboard shortcuts work in the formula editor of the FormulaBuilder plugin, while you edit a cell in place or in the formula bar. For details, see Formula builder.

WindowsmacOSActionExcelSheets
EnterEnterCommit the edit and move the selection down, or as set by enterMoves. With the autocomplete popup open, insert the highlighted suggestion.✓✓
Shift+Enter⇧+EnterCommit the edit and move the selection up, or the opposite way of enterMoves✓✓
TabTabCommit the edit and move the selection to the next cell (right by default, left in RTL), as set by tabMoves. With the autocomplete popup open, insert the highlighted suggestion.✓✓
Shift+Tab⇧+TabCommit the edit and move the selection to the previous cell (left by default, right in RTL)✓✓
Ctrl+Enter⌃/⌘+EnterCommit the edit to every selected cell, as in the grid’s other editors✓✓
Alt+Enter⌥+EnterInsert a line break in the formula✓✓
EscapeEscapeClose the open popup. With no popup open, leave point mode, or cancel the edit.✓✓
↑ / ↓↑ / ↓With the autocomplete popup open, move through the suggestions✓✓
Arrow keysArrow keysIn point mode, move the reference cursor one cell✓✓
Shift+Arrow keys⇧+Arrow keysIn point mode, extend the reference into a range✓✓
Ctrl+Arrow keys⌃/⌘+Arrow keysIn point mode, jump the reference cursor to the edge of the data block✓✓
Ctrl+Shift+Arrow keys⌃/⌘+⇧+Arrow keysIn point mode, extend the reference to the edge of the data block✓✓
F2 or Ctrl+EF2 or ⌃/⌘+ESwitch point mode on or off✓✗
F4F4Cycle the reference at the caret between relative and absolute forms✓✓
F6 / Shift+F6F6 / ⇧+F6While you edit a cell, move the editor between the formula bar and the cell. With the function help popup open, move the focus into it.✗✗
Shift+Tab⇧+TabFrom the first column (from the first cell with autoWrapRow on), leave the grid through the formula bar (the formula area first, then the address box)✗✗
EnterEnterIn the formula bar’s address box, go to the typed address or range✓✓
EscapeEscapeIn the formula bar’s address box, put back the address of the active cell or the selected range✓✓

Point mode is on in a formula when a reference is valid at the caret, for example right after =, an operator, an argument separator, or an opening parenthesis.

Freeze bar keyboard shortcuts

These keyboard shortcuts work when the FreezeBar plugin is enabled. The first two work in the grid. The rest work on a freeze bar that has the focus.

WindowsmacOSActionExcelSheets
F6F6Move the focus to the first freeze bar. When a bar has the focus, move to the next bar.✗✗
Shift+F6⇧+F6Move the focus to the last freeze bar. When a bar has the focus, move to the previous bar.✗✗
→ / ↓→ / ↓Freeze one more column or row on the start and top edges, and one fewer on the end and bottom edges.✗✗
← / ↑← / ↑Freeze one fewer column or row on the start and top edges, and one more on the end and bottom edges.✗✗
HomeHomeUnfreeze all the columns or rows on the edge.✗✗
EndEndFreeze as many columns or rows as fit in the grid, and leave room to scroll.✗✗
EscapeEscapeMove the focus back to the selected cell.✗✗

In a right-to-left layout, the horizontal arrows swap. Escape also cancels a drag of a freeze bar.

API reference

For the list of options, methods, and Handsontable hooks related to keyboard navigation, see the following API reference pages:

APIs

Configuration options

Core methods

Hooks

Troubleshooting

Didn’t find what you need? Try this: