Keyboard Shortcuts Reference
A grouped keyboard shortcuts section, organized into columns like General, Navigation, and Editing. Each shortcut pairs an action description with a cluster of keycap-styled <kbd> elements joined by a plus sign for combos. Built for docs pages, onboarding screens, and app help panels.
Docs
Installation
A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its dependencies and any missing npm packages, and installs them straight into your project.
npx shadcn add https://staaarter.com/r/keyboard-shortcuts-reference.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/devtools/devtools4.tsx instead.
Usage
The file also exports devtools4Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.
import { Devtools4, devtools4Demo } from "@/components/blocks/devtools/devtools4"; export default function Page() { return <Devtools4 {...devtools4Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| heading | string | "Keyboard Shortcuts" | Section heading. |
| description | string | undefined | Section intro text below the heading. |
| groups | ShortcutGroup[] | [] | Shortcut groups, each rendered as its own column. |
| className | string | none | Extra classes for the outer section element. |
Types
type ShortcutItem = { action: string; keys: string[] }; type ShortcutGroup = { title: string; shortcuts: ShortcutItem[] };
Behavior notes
- Entirely static; no client-side interactivity, and pressing the displayed keys does nothing on the page itself.
- Groups render in a fixed 2-column grid on sm and above and stack to a single column below that; the grid does not adapt column count to the number of groups.
- Each key in a combo is its own <kbd> element with a "+" separator between them; there is no limit enforced on how many keys a combo can list, though 2-3 keeps the row readable.
- The keycap look (bordered, shadow, bg-muted) is achieved with a plain box-shadow utility, not a real 3D or pressable interaction.
More DevTools Blocks
View all →api-endpoints-sample-call
API Endpoints With Sample Call
Reference list of API endpoints paired with a live sample request and response panel.
cicd-pipeline-status
CI/CD Pipeline Status
Recent CI/CD pipeline runs with per-stage status chips and overall run badges.
code-diff-viewer
Code Diff Viewer
Unified code diff panel with a file header change summary and colored addition/deletion lines.
performance-waterfall
Performance Waterfall
Network request waterfall chart with cascading timing bars colored by duration.
service-health-board
Service Health Board
Infrastructure status board with a live summary strip and per-service uptime, latency, and health.
queue-monitor
Queue Monitor
Background job queue monitor with processed/pending/failed counts and a per-queue capacity bar.