Skip to main content

Keyboard-shortcuts overlay

Prop showShortcuts — adapter chrome, default false.

Guide

When to use it

Show users the keyboard shortcuts active on this grid — a discoverability aid for power features.

How it works

Adds a "?" button (also opens on the ? key) → a theme-aware overlay listing the shortcuts that are actually wired (grouped · searchable · ⌘/Ctrl-aware). It reads the live flag set, so it shows only what's on (selection / clipboard / editing / undo / …). Force the platform with showShortcuts={{ platform: 'mac' }}.

Gotchas

  • The list is derived from the active flags, so it never advertises a shortcut the grid can't do.
  • Chrome — needs showToolbar for the button (the ? key works regardless).

Live example

Keyboard-shortcuts overlay — the shortcuts active on this grid

Example source
import React from 'react'
import { BstTableMui } from '@bloomskill/table-mui'
import type { BstTableColumn } from '@bloomskill/table-engine'
import '@bloomskill/table-engine/styles.css'
type Row = { id: string; name: string; team: string; role: string; score: number }
const seed: Row[] = [
{ id: '1', name: 'Ada Lovelace', team: 'Platform', role: 'Engineer', score: 92 },
{ id: '2', name: 'Alan Turing', team: 'Research', role: 'Scientist', score: 88 },
{ id: '3', name: 'Grace Hopper', team: 'Platform', role: 'Engineer', score: 95 },
{ id: '4', name: 'Katherine J.', team: 'Research', role: 'Analyst', score: 90 },
{ id: '5', name: 'Edsger Dijkstra', team: 'Platform', role: 'Architect', score: 84 },
]
const columns: BstTableColumn<Row>[] = [
{ id: 'name', accessorKey: 'name', header: 'Name' },
{ id: 'team', accessorKey: 'team', header: 'Team' },
{ id: 'role', accessorKey: 'role', header: 'Role' },
{ id: 'score', accessorKey: 'score', header: 'Score', sortFn: 'basic' },
]
export default function App() {
return (
<BstTableMui data={seed} columns={columns} getRowId={(r) => r.id}
enableCellSelection enableClipboard enableEditing showShortcuts />
)
}
Loading live example…

All keyboard shortcuts

Every shortcut Bst-Table supports, with both Mac and Windows / Linux keys. The in-grid overlay shows only the shortcuts active on a given grid; this reference lists them all. Each needs the flag(s) in Requires to be on.

ActionMacWindows / LinuxRequires
Move active cell↑ ↓ ← →↑ ↓ ← →enableCellSelection
Extend selection⇧ + arrowsShift + arrowsenableCellSelection
Jump to edge⌘ + arrowsCtrl + arrowsenableCellSelection
Next cell (wraps rows)TabTabenableCellSelection
Previous cell⇧ + TabShift + TabenableCellSelection
Row start / Row endHome / EndHome / EndenableCellSelection
Grid start⌘ + HomeCtrl + HomeenableCellSelection
Grid end⌘ + EndCtrl + EndenableCellSelection
Select all⌘ + ACtrl + AenableCellSelection

Find

ActionMacWindows / LinuxRequires
Open find⌘ + FCtrl + FenableFind
Next matchF3F3enableFind
Previous match⇧ + F3Shift + F3enableFind
Next / previous (in find box)Enter / ⇧ + EnterEnter / Shift + EnterenableFind
Close findEscEscenableFind

Edit

ActionMacWindows / LinuxRequires
Edit cell (or move down)EnterEnterenableCellSelection + enableEditing
Edit cell in placeF2F2enableEditing
Cancel edit / clear selectionEscEscenableCellSelection
Type to overwrite the cellany A–Z / 0–9any A–Z / 0–9enableTypeToEdit
Commit & move down (⇧ = up)EnterEnterenableTypeToEdit
Commit & move right (⇧ = left)TabTabenableTypeToEdit

Clipboard

ActionMacWindows / LinuxRequires
Copy selection⌘ + CCtrl + CenableClipboard
Paste⌘ + VCtrl + VenableClipboard + enableEditing
Select whole column⌘ + SpaceCtrl + SpaceenableCopyColumn
Select whole row⇧ + SpaceShift + SpaceenableCopyRow

History

ActionMacWindows / LinuxRequires
Undo⌘ + ZCtrl + ZenableUndoRedo
Redo⌘ + ⇧ + ZCtrl + Shift + ZenableUndoRedo
Redo (alternate)Ctrl + YenableUndoRedo
Open this shortcuts overlay??showShortcuts

Overview

Layershow* (chrome, resolved in the adapter)
Typeboolean
Defaultfalse
Maps toadapter toolbar "?" button + a dep-free, theme-aware overlay listing the keyboard shortcuts ACTIVE on this grid (grouped · searchable · platform-aware ⌘/Ctrl), also opens on the ? key. Headless BSTSHORTCUTSREGISTRY + pure resolveActiveShortcuts(flags, query) filter by enableCellSelection/enableClipboard/enableEditing/enableUndoRedo/enableCopyColumn/enableCopyRow (mirrors the onKeyDown handler, guarded by shortcuts.test.tsx). Not a settings-sheet toggle
Status✅ done
Sincev0.36.0

Enable it

<BstTableMui
data={rows}
columns={columns}
showShortcuts
/>

Swap BstTableMui for BstTableShadcn (and the CSS import) for the shadcn skin — same props.

Options

OptionNotes
BstShortcutsRelated prop for this feature.
BST_SHORTCUTS_REGISTRYRelated prop for this feature.

Behavior & interactions

  • A "?" button + dep-free overlay listing the keyboard shortcuts ACTIVE on this grid — filtered by enableCellSelection / enableClipboard / enableEditing / enableUndoRedo / copy toggles. Also opens on the ? key. Backed by BST_SHORTCUTS_REGISTRY + resolveActiveShortcuts.
  • Chrome flag: it only renders its control when the matching enable* behaviour is on.