Skip to content

Commit f403cb5

Browse files
committed
Add keyboard shortcuts documentation
- Create docs/src/keybinds.md with all keybinds - Use src/utils/ui/keybinds.ts as source of truth - Add cross-references in both files to keep them in sync - Fix intro.md to remove architecture link - Update SUMMARY.md to include keybinds page
1 parent 675c7bb commit f403cb5

File tree

4 files changed

+52
-1
lines changed

4 files changed

+52
-1
lines changed

docs/src/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22

33
- [Introduction](./intro.md)
44
- [Getting Started](./getting-started.md)
5+
- [Keyboard Shortcuts](./keybinds.md)

docs/src/intro.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,3 @@
1212
## Quick Links
1313

1414
- [Getting Started](./getting-started.md)
15-
- [Architecture Overview](./architecture.md)

docs/src/keybinds.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Keyboard Shortcuts
2+
3+
cmux is designed to be keyboard-driven for maximum efficiency. All major actions have keyboard shortcuts.
4+
5+
> **Note**: This document should be kept in sync with `src/utils/ui/keybinds.ts`, which is the source of truth for keybind definitions.
6+
7+
## Platform Conventions
8+
9+
- **macOS**: Shortcuts use `` (Command) as the primary modifier
10+
- **Linux/Windows**: Shortcuts use `Ctrl` as the primary modifier
11+
12+
When documentation shows `Ctrl`, it means:
13+
- `` (Command) on macOS
14+
- `Ctrl` on Linux/Windows
15+
16+
## General
17+
18+
| Action | Shortcut |
19+
|--------|----------|
20+
| Cancel / Close / Interrupt | `Esc` |
21+
22+
## Chat & Messages
23+
24+
| Action | Shortcut |
25+
|--------|----------|
26+
| Send message | `Enter` |
27+
| New line in message | `Shift+Enter` |
28+
| Jump to bottom of chat | `Shift+G` |
29+
30+
## Workspaces
31+
32+
| Action | Shortcut |
33+
|--------|----------|
34+
| Create new workspace | `Ctrl+N` |
35+
| Next workspace | `Ctrl+J` |
36+
| Previous workspace | `Ctrl+K` |
37+
38+
## Modes
39+
40+
| Action | Shortcut |
41+
|--------|----------|
42+
| Toggle between Plan and Exec modes | `Ctrl+Shift+M` |
43+
44+
## Tips
45+
46+
- **Vim-inspired navigation**: We use `J`/`K` for next/previous navigation, similar to Vim
47+
- **Consistent modifiers**: Most workspace/project operations use `Ctrl` as the modifier
48+
- **Natural expectations**: We try to use shortcuts users would naturally expect (e.g., `Ctrl+N` for new)

src/utils/ui/keybinds.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
/**
22
* Centralized keybind utilities for consistent keyboard shortcut handling
33
* and OS-aware display across the application.
4+
*
5+
* NOTE: This file is the source of truth for keybind definitions.
6+
* When adding/modifying keybinds, also update docs/src/keybinds.md
47
*/
58

69
/**

0 commit comments

Comments
 (0)