Skip to content

Document the keyboard shortcuts in the README - #4253

Merged
amanmahajan7 merged 4 commits into
mainfrom
docs-keyboard-shortcuts
Oct 27, 2026
Merged

amanmahajan7 merged 4 commits into
mainfrom
docs-keyboard-shortcuts

Conversation

@amanmahajan7

@amanmahajan7 amanmahajan7 commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Adds a short Keyboard Shortcuts section to the README, linked from the table of contents. It lists the grid's default keys for navigation, editing, selection, and header cells. Users had no way to discover shortcuts like Shift+Space row selection or Ctrl+←/→ column resizing.

The section only lists the keys. For the conditions, such as which props enable selection, sorting, copy and paste, it links to the existing API docs, and it links to the TreeDataGrid section for the tree grid keys.

How it was checked

  • Against the code: each row was checked against DataGrid.tsx, keyboardUtils.ts, EditCell.tsx and HeaderCell.tsx.
  • Independent review: a separate agent ran throwaway Chromium tests for the less obvious cases:
    • which keys open the editor;
    • the sort cycle, and Ctrl adding to the sort;
    • onCellKeyDown not being called for header cells.
  • Links: all in-page links resolve to existing headings.
  • vp check and vp run eslint pass.

Notes, not changed in this PR

  • ⌘+← on macOS: the resize handler only calls stopPropagation(), not preventDefault(), so ⌘+← might also trigger the browser's Back shortcut. That's the existing TODO in HeaderCell.tsx.
  • Copy and paste while editing: with an editor open, onCellCopy and onCellPaste still fire, which may be unintended.

🤖 Generated with Claude Code

amanmahajan7 and others added 2 commits October 26, 2026 19:27
F2 has no dedicated handling, it only opens the editor like any other
key that isn't a modifier, navigation, or function key.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@amanmahajan7
amanmahajan7 marked this pull request as ready for review October 27, 2026 00:30
@amanmahajan7 amanmahajan7 self-assigned this Oct 27, 2026
Backspace and Delete have no dedicated handling either, and listing them
suggests they clear the cell, as in spreadsheets.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Comment thread README.md

| Keys | Action |
| --------------------------------- | -------------------------------------------------------------------------------- |
| <kbd>Shift</kbd>+<kbd>Space</kbd> | Select or deselect the [row](#selectedrows-maybereadonlysetk) of the active cell |

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL!

@amanmahajan7
amanmahajan7 enabled auto-merge (squash) October 27, 2026 14:09
@amanmahajan7
amanmahajan7 merged commit 5de8ae4 into main Oct 27, 2026
6 checks passed
@amanmahajan7
amanmahajan7 deleted the docs-keyboard-shortcuts branch October 27, 2026 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants