Description
Add keyboard shortcuts to the Next.js dashboard for power users.
Shortcuts
| Shortcut |
Action |
Cmd+K / Ctrl+K |
Focus search |
Cmd+N / Ctrl+N |
Open new memory dialog |
Escape |
Close modals/panels |
? |
Show shortcuts help |
Implementation
- Add a global
useEffect with keydown listener in layout.tsx
- Use
event.metaKey (Mac) or event.ctrlKey (Windows/Linux)
- Navigate to
/search on Cmd+K
- Show a help modal on
?
Good first issue
Fun React feature. Dashboard is in packages/dashboard/src/.