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 { | |||
| 60 | 60 | {"ctrl+f", h.handleFindToggle, "Find in page"}, | |
| 61 | 61 | {"ctrl+shift+c", h.handleCopyURL, "Copy URL"}, | |
| 62 | 62 | {"ctrl+shift+p", h.handlePrint, "Print page"}, | |
| 63 | + | {"ctrl+t", h.handleNewTab, "New tab (no-op)"}, | |
| 63 | 64 | {"ctrl+w", h.handleClosePane, "Close current pane"}, | |
| 64 | 65 | {"F12", h.handleDevTools, "Developer tools"}, | |
| 65 | 66 | // 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 | 380 | // Cleanup releases resources | |
| 373 | 381 | func (h *WindowShortcutHandler) Cleanup() { | |
| 374 | 382 | // 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 targeting | 66 | // 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 resources | 380 | // Cleanup releases resources | ||
| 373 | func (h *WindowShortcutHandler) Cleanup() { | 381 | func (h *WindowShortcutHandler) Cleanup() { | ||
| 374 | // WindowShortcuts doesn't require explicit cleanup | 382 | // WindowShortcuts doesn't require explicit cleanup | ||