Skip to content

Commit 828329e

Browse files
committed
fix: use hjkl for span navigation
1 parent a247b6d commit 828329e

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

src/commands.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export function getCommands(actions: {
5959
id: "toggle-help",
6060
label: "Toggle Help",
6161
description: "Show or hide the help overlay",
62-
shortcut: "? or h",
62+
shortcut: "?",
6363
category: "view",
6464
execute: actions.toggleHelp,
6565
},

src/index.tsx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -48,34 +48,32 @@ function HelpOverlay() {
4848
<text style={{ fg: "#c0caf5" }}>
4949
{`Navigation:
5050
[Tab] - Cycle focus: Clients → Spans → Metrics
51-
[j] or [↓] - Navigate down in focused section
52-
[k] or [↑] - Navigate up in focused section
53-
[←] - Collapse span, navigate to parent, or navigate up
54-
[→] - Expand span, navigate to first child, or navigate down
51+
[j/k] or [↓/↑] - Navigate down/up in focused section
52+
[h/l] or [←/→] - Navigate left/right (collapse/expand spans)
5553
[Enter] - Expand/collapse span (when Spans focused)
5654
5755
Clients Section:
5856
Auto-expands when focused
5957
Navigate to select active client (filters spans and metrics)
6058
6159
Spans Section:
62-
Navigate to select span with arrows or j/k
63-
Press → to expand and navigate into children
64-
Press ← to collapse and navigate to parent
60+
Navigate to select span with arrows or hjkl
61+
Press l/→ to expand and navigate into children
62+
Press h/← to collapse and navigate to parent
6563
Selected span details shown in right panel
6664
6765
Metrics Section:
6866
Navigate to select metric, details shown inline below
6967
7068
General:
7169
[:] - Open command palette (search and execute commands)
72-
[?] or [h] - Toggle this help
70+
[?] - Toggle this help
7371
[F12] - Toggle debug console (shows internal logs)
7472
[c] - Clear spans or metrics (depending on focused section)
7573
[q] - Quit application
7674
[Ctrl+C] - Force exit
7775
78-
Press any key (except arrows/j/k) to close...`}
76+
Press any key (except arrows/hjkl) to close...`}
7977
</text>
8078
</scrollbox>
8179
</box>
@@ -151,7 +149,7 @@ function AppContent() {
151149
}
152150

153151
// Help toggle
154-
if (key.name === "?" || (key.name === "h" && !key.ctrl)) {
152+
if (key.name === "?") {
155153
actions.toggleHelp();
156154
return;
157155
}
@@ -176,8 +174,10 @@ function AppContent() {
176174
key.name === "down" ||
177175
key.name === "left" ||
178176
key.name === "right" ||
177+
key.name === "h" ||
179178
key.name === "j" ||
180179
key.name === "k" ||
180+
key.name === "l" ||
181181
key.name === "pageup" ||
182182
key.name === "pagedown"
183183
) {
@@ -198,7 +198,7 @@ function AppContent() {
198198
return;
199199
}
200200

201-
// Vim-style navigation
201+
// Vim-style navigation (hjkl + arrow keys)
202202
if (key.name === "j" || key.name === "down") {
203203
actions.navigateDown();
204204
return;
@@ -207,11 +207,11 @@ function AppContent() {
207207
actions.navigateUp();
208208
return;
209209
}
210-
if (key.name === "left") {
210+
if (key.name === "h" || key.name === "left") {
211211
actions.navigateLeft();
212212
return;
213213
}
214-
if (key.name === "right") {
214+
if (key.name === "l" || key.name === "right") {
215215
actions.navigateRight();
216216
return;
217217
}

0 commit comments

Comments
 (0)