Keyboard
Click a cell or tab into the grid, then:
Live demoKeyboard navigation
Arrow keys, Tab, Home/End and Page keys move the focused cell.
Code for this demo
import { createGrid } from '@freegridjs/core';
import { demoColumns, makeRows } from '../data';
import { text, tr, type DemoContext } from '../ui';
export default function mount(ctx: DemoContext) {
const { lang } = ctx;
const grid = createGrid(ctx.host, { columns: demoColumns(lang, 10), data: makeRows(10_000, 10), rowSelection: 'multiple', locale: lang });
grid.on('focusChange', e => ctx.log(`focusChange → row ${e.rowIndex + 1}, ${e.colId}`));
grid.on('cellDoubleClick', e => ctx.log(`cellDoubleClick → ${e.colId}: ${String(e.value)}`));
text(ctx, tr(lang, {
en: 'Click a cell, then use ← ↑ → ↓, Tab, Home/End, Ctrl+Home/End, PageUp/PageDown and Space.',
ko: '셀을 클릭한 뒤 ← ↑ → ↓, Tab, Home/End, Ctrl+Home/End, PageUp/PageDown, Space를 눌러 보세요.',
}));
return grid;
}Click a cell or tab into the grid, then:
| Key | Action |
|---|---|
← ↑ → ↓ | Move the focused cell. |
Tab / Shift+Tab | Next / previous cell, wrapping rows; leaves the grid at the ends. |
Home / End | First / last column. |
Ctrl+Home / Ctrl+End | First / last cell. |
PageUp / PageDown | One screen up / down. |
Shift + ← ↑ → ↓ / Home / End / Page | Extend the cell range. |
Ctrl+A | Select every cell. |
Ctrl+C / Ctrl+V | Copy to / paste from Excel (TSV). |
Ctrl+F | Find in the grid. |
Shift+F10 / ContextMenu | Open the right-click menu. |
Enter / F2 / typing | Start editing an editable cell. |
Enter / Tab / Esc (editing) | Save and move down / save and move right / cancel. |
Delete | Clear editable cells. |
Ctrl+Z / Ctrl+Y | Undo / redo. |
Space | Toggle the focused row’s selection. |
Esc | Close the column menu or chooser. |