detached 30663df

feat(browser): add Ctrl+T no-op handler for future tab support

Add handleNewTab() as a no-op handler that prevents default browser
behavior and logs when Ctrl+T is pressed. Includes TODO comment for
future tab implementation.
commit
30663df847096e5b8aff40264a8d9c372fcbd30e
author
bamen · · 2025-10-09 17:46 UTC
committer
bamen · · 2025-10-09 17:17 UTC
parent
00b77e6
signature
unsigned
1 file · +8 -0
M internal/app/browser/window_shortcuts.go +8 -0
@@ -60,6 +60,7 @@ func (h *WindowShortcutHandler) registerGlobalShortcuts() error {
6060 {"ctrl+f", h.handleFindToggle, "Find in page"},
6161 {"ctrl+shift+c", h.handleCopyURL, "Copy URL"},
6262 {"ctrl+shift+p", h.handlePrint, "Print page"},
63+ {"ctrl+t", h.handleNewTab, "New tab (no-op)"},
6364 {"ctrl+w", h.handleClosePane, "Close current pane"},
6465 {"F12", h.handleDevTools, "Developer tools"},
6566 // Zoom shortcuts - global level for proper active pane targeting
@@ -369,6 +370,13 @@ func (h *WindowShortcutHandler) handleClosePane() {
369370 }
370371 }
371372
373+// handleNewTab is a no-op handler for Ctrl+T
374+// This prevents the default browser behavior and allows for future implementation
375+func (h *WindowShortcutHandler) handleNewTab() {
376+ log.Printf("[window-shortcuts] Ctrl+T pressed (no-op - tabs not yet implemented)")
377+ // TODO: Implement new tab functionality
378+}
379+
372380 // Cleanup releases resources
373381 func (h *WindowShortcutHandler) Cleanup() {
374382 // WindowShortcuts doesn't require explicit cleanup
@@ -60,6 +60,7 @@ func (h *WindowShortcutHandler) registerGlobalShortcuts() error {
60 {"ctrl+f", h.handleFindToggle, "Find in page"},60 {"ctrl+f", h.handleFindToggle, "Find in page"},
61 {"ctrl+shift+c", h.handleCopyURL, "Copy URL"},61 {"ctrl+shift+c", h.handleCopyURL, "Copy URL"},
62 {"ctrl+shift+p", h.handlePrint, "Print page"},62 {"ctrl+shift+p", h.handlePrint, "Print page"},
63+ {"ctrl+t", h.handleNewTab, "New tab (no-op)"},
63 {"ctrl+w", h.handleClosePane, "Close current pane"},64 {"ctrl+w", h.handleClosePane, "Close current pane"},
64 {"F12", h.handleDevTools, "Developer tools"},65 {"F12", h.handleDevTools, "Developer tools"},
65 // Zoom shortcuts - global level for proper active pane targeting66 // Zoom shortcuts - global level for proper active pane targeting
@@ -369,6 +370,13 @@ func (h *WindowShortcutHandler) handleClosePane() {
369 }370 }
370 }371 }
371 372
373+// handleNewTab is a no-op handler for Ctrl+T
374+// This prevents the default browser behavior and allows for future implementation
375+func (h *WindowShortcutHandler) handleNewTab() {
376+ log.Printf("[window-shortcuts] Ctrl+T pressed (no-op - tabs not yet implemented)")
377+ // TODO: Implement new tab functionality
378+}
379+
372 // Cleanup releases resources380 // Cleanup releases resources
373 func (h *WindowShortcutHandler) Cleanup() {381 func (h *WindowShortcutHandler) Cleanup() {
374 // WindowShortcuts doesn't require explicit cleanup382 // WindowShortcuts doesn't require explicit cleanup

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 8

Tags 42

↑↓ moveenter openesc close