Skip to content

Keyboard Navigation

RevoGrid supports spreadsheet-style keyboard interaction for moving the focused cell, selecting ranges, editing values, and using the clipboard. Keyboard actions apply to the focused grid; configure range and useClipboard when your workflow needs range selection or clipboard operations.

ts
const grid = document.querySelector('revo-grid');

if (grid) {
  grid.range = true;
  grid.useClipboard = true;
}

Move focus and select ranges

ShortcutBehavior
ArrowMove the focused cell one position in the selected direction.
TabMove focus one cell to the right.
Shift + TabMove focus one cell to the left.
Shift + ArrowExtend the active range in that direction when range is enabled.

Jump to a grid edge

Use the primary platform modifier with an arrow key to move directly to the first or last available row or column.

PlatformShortcut
Windows and LinuxCtrl + Arrow
macOSCmd + Arrow

Add Shift to either shortcut to extend the active range to that edge. Range extension requires range: true.

RevoGrid does not consume primary-modifier shortcuts that use Tab or Alt + Arrow, so the browser can retain those shortcuts.

Edit and clear cells

ShortcutBehavior
Printable keyStart editing the focused cell with that value.
EnterStart editing the focused cell.
Escape while editingCancel the active edit.
Backspace or DeleteClear the active selection when the grid is editable.

Whether an edit can be applied still follows the grid and column readonly settings. See Editing for editor configuration and lifecycle events.

Select all and use the clipboard

ShortcutBehavior
Ctrl/Cmd + ASelect all cells when range is enabled.
Ctrl/Cmd + CCopy the active selection.
Ctrl/Cmd + XCut the active selection.
Ctrl/Cmd + VPaste at the focused cell.

Clipboard actions require useClipboard. For clipboard configuration, range fill behavior, and events, see Clipboard Operations.

Customize keyboard behavior

Listen for the cancelable beforekeydown event to inspect or replace a keyboard action before RevoGrid handles it:

ts
grid.addEventListener('beforekeydown', event => {
  const { original } = event.detail;

  if (original.key === 'F2') {
    event.preventDefault();
    // Run an application-specific action.
  }
});

For focus management and wider accessibility guidance, see Accessibility.