detached b27d495

style(fmt): apply go fmt

commit
b27d495fcd4d773afe60fe6dc68ec3f0d2621ca7
author
bnema · · 2025-12-21 21:12 UTC
parent
43d4a4d
signature
unsigned
17 files · +137 -129
M cmd/dumber/main.go +20 -20
@@ -288,26 +288,26 @@ func buildUIDependencies(
288288 faviconService *favicon.Service,
289289 ) *ui.Dependencies {
290290 return &ui.Dependencies{
291- Ctx: ctx,
292- Config: cfg,
293- InitialURL: initialURL,
294- Theme: themeManager,
295- WebContext: wkCtx,
296- Pool: pool,
297- Settings: settings,
298- Injector: injector,
299- MessageRouter: messageRouter,
300- HistoryRepo: historyRepo,
301- FavoriteRepo: favoriteRepo,
302- ZoomRepo: zoomRepo,
303- TabsUC: tabsUC,
304- PanesUC: panesUC,
305- HistoryUC: historyUC,
306- FavoritesUC: favoritesUC,
307- ZoomUC: zoomUC,
308- NavigateUC: navigateUC,
309- CopyURLUC: copyURLUC,
310- Clipboard: clipboardAdapter,
291+ Ctx: ctx,
292+ Config: cfg,
293+ InitialURL: initialURL,
294+ Theme: themeManager,
295+ WebContext: wkCtx,
296+ Pool: pool,
297+ Settings: settings,
298+ Injector: injector,
299+ MessageRouter: messageRouter,
300+ HistoryRepo: historyRepo,
301+ FavoriteRepo: favoriteRepo,
302+ ZoomRepo: zoomRepo,
303+ TabsUC: tabsUC,
304+ PanesUC: panesUC,
305+ HistoryUC: historyUC,
306+ FavoritesUC: favoritesUC,
307+ ZoomUC: zoomUC,
308+ NavigateUC: navigateUC,
309+ CopyURLUC: copyURLUC,
310+ Clipboard: clipboardAdapter,
311311 FaviconService: faviconService,
312312 FilterManager: filterManager,
313313 }
@@ -288,26 +288,26 @@ func buildUIDependencies(
288 faviconService *favicon.Service,288 faviconService *favicon.Service,
289 ) *ui.Dependencies {289 ) *ui.Dependencies {
290 return &ui.Dependencies{290 return &ui.Dependencies{
291- Ctx: ctx,291+ Ctx: ctx,
292- Config: cfg,292+ Config: cfg,
293- InitialURL: initialURL,293+ InitialURL: initialURL,
294- Theme: themeManager,294+ Theme: themeManager,
295- WebContext: wkCtx,295+ WebContext: wkCtx,
296- Pool: pool,296+ Pool: pool,
297- Settings: settings,297+ Settings: settings,
298- Injector: injector,298+ Injector: injector,
299- MessageRouter: messageRouter,299+ MessageRouter: messageRouter,
300- HistoryRepo: historyRepo,300+ HistoryRepo: historyRepo,
301- FavoriteRepo: favoriteRepo,301+ FavoriteRepo: favoriteRepo,
302- ZoomRepo: zoomRepo,302+ ZoomRepo: zoomRepo,
303- TabsUC: tabsUC,303+ TabsUC: tabsUC,
304- PanesUC: panesUC,304+ PanesUC: panesUC,
305- HistoryUC: historyUC,305+ HistoryUC: historyUC,
306- FavoritesUC: favoritesUC,306+ FavoritesUC: favoritesUC,
307- ZoomUC: zoomUC,307+ ZoomUC: zoomUC,
308- NavigateUC: navigateUC,308+ NavigateUC: navigateUC,
309- CopyURLUC: copyURLUC,309+ CopyURLUC: copyURLUC,
310- Clipboard: clipboardAdapter,310+ Clipboard: clipboardAdapter,
311 FaviconService: faviconService,311 FaviconService: faviconService,
312 FilterManager: filterManager,312 FilterManager: filterManager,
313 }313 }
M internal/application/port/webui_config.go +3 -3
@@ -4,9 +4,9 @@ import "context"
44
55 // WebUIConfig represents the subset of configuration editable in dumb://config.
66 type WebUIConfig struct {
7- Appearance WebUIAppearanceConfig `json:"appearance"`
8- DefaultUIScale float64 `json:"default_ui_scale"`
9- DefaultSearchEngine string `json:"default_search_engine"`
7+ Appearance WebUIAppearanceConfig `json:"appearance"`
8+ DefaultUIScale float64 `json:"default_ui_scale"`
9+ DefaultSearchEngine string `json:"default_search_engine"`
1010 SearchShortcuts map[string]SearchShortcut `json:"search_shortcuts"`
1111 }
1212
@@ -4,9 +4,9 @@ import "context"
4 4
5 // WebUIConfig represents the subset of configuration editable in dumb://config.5 // WebUIConfig represents the subset of configuration editable in dumb://config.
6 type WebUIConfig struct {6 type WebUIConfig struct {
7- Appearance WebUIAppearanceConfig `json:"appearance"`7+ Appearance WebUIAppearanceConfig `json:"appearance"`
8- DefaultUIScale float64 `json:"default_ui_scale"`8+ DefaultUIScale float64 `json:"default_ui_scale"`
9- DefaultSearchEngine string `json:"default_search_engine"`9+ DefaultSearchEngine string `json:"default_search_engine"`
10 SearchShortcuts map[string]SearchShortcut `json:"search_shortcuts"`10 SearchShortcuts map[string]SearchShortcut `json:"search_shortcuts"`
11 }11 }
12 12
M internal/application/usecase/manage_panes.go +4 -0
@@ -682,6 +682,7 @@ func (uc *ManagePanesUseCase) AddToStack(
682682
683683 // NavigateStack cycles through stacked panes.
684684 // direction: NavUp for previous, NavDown for next.
685+//
685686 //nolint:revive // receiver required for interface consistency
686687 func (uc *ManagePanesUseCase) NavigateStack(
687688 ctx context.Context,
@@ -751,6 +752,7 @@ func (uc *ManagePanesUseCase) NavigateStack(
751752
752753 // RemoveFromStack removes a pane from a stack.
753754 // If only one pane remains, the stack is dissolved.
755+//
754756 //nolint:revive // receiver required for interface consistency
755757 func (uc *ManagePanesUseCase) RemoveFromStack(ctx context.Context, stackNode *entity.PaneNode, paneID entity.PaneID) error {
756758 log := logging.FromContext(ctx)
@@ -802,6 +804,7 @@ func (uc *ManagePanesUseCase) RemoveFromStack(ctx context.Context, stackNode *en
802804 }
803805
804806 // GetAllPanes returns all leaf panes in a workspace.
807+//
805808 //nolint:revive // receiver required for interface consistency
806809 func (uc *ManagePanesUseCase) GetAllPanes(ws *entity.Workspace) []*entity.Pane {
807810 if ws == nil || ws.Root == nil {
@@ -811,6 +814,7 @@ func (uc *ManagePanesUseCase) GetAllPanes(ws *entity.Workspace) []*entity.Pane {
811814 }
812815
813816 // CountPanes returns the number of panes in a workspace.
817+//
814818 //nolint:revive // receiver required for interface consistency
815819 func (uc *ManagePanesUseCase) CountPanes(ws *entity.Workspace) int {
816820 if ws == nil {
@@ -682,6 +682,7 @@ func (uc *ManagePanesUseCase) AddToStack(
682 682
683 // NavigateStack cycles through stacked panes.683 // NavigateStack cycles through stacked panes.
684 // direction: NavUp for previous, NavDown for next.684 // direction: NavUp for previous, NavDown for next.
685+//
685 //nolint:revive // receiver required for interface consistency686 //nolint:revive // receiver required for interface consistency
686 func (uc *ManagePanesUseCase) NavigateStack(687 func (uc *ManagePanesUseCase) NavigateStack(
687 ctx context.Context,688 ctx context.Context,
@@ -751,6 +752,7 @@ func (uc *ManagePanesUseCase) NavigateStack(
751 752
752 // RemoveFromStack removes a pane from a stack.753 // RemoveFromStack removes a pane from a stack.
753 // If only one pane remains, the stack is dissolved.754 // If only one pane remains, the stack is dissolved.
755+//
754 //nolint:revive // receiver required for interface consistency756 //nolint:revive // receiver required for interface consistency
755 func (uc *ManagePanesUseCase) RemoveFromStack(ctx context.Context, stackNode *entity.PaneNode, paneID entity.PaneID) error {757 func (uc *ManagePanesUseCase) RemoveFromStack(ctx context.Context, stackNode *entity.PaneNode, paneID entity.PaneID) error {
756 log := logging.FromContext(ctx)758 log := logging.FromContext(ctx)
@@ -802,6 +804,7 @@ func (uc *ManagePanesUseCase) RemoveFromStack(ctx context.Context, stackNode *en
802 }804 }
803 805
804 // GetAllPanes returns all leaf panes in a workspace.806 // GetAllPanes returns all leaf panes in a workspace.
807+//
805 //nolint:revive // receiver required for interface consistency808 //nolint:revive // receiver required for interface consistency
806 func (uc *ManagePanesUseCase) GetAllPanes(ws *entity.Workspace) []*entity.Pane {809 func (uc *ManagePanesUseCase) GetAllPanes(ws *entity.Workspace) []*entity.Pane {
807 if ws == nil || ws.Root == nil {810 if ws == nil || ws.Root == nil {
@@ -811,6 +814,7 @@ func (uc *ManagePanesUseCase) GetAllPanes(ws *entity.Workspace) []*entity.Pane {
811 }814 }
812 815
813 // CountPanes returns the number of panes in a workspace.816 // CountPanes returns the number of panes in a workspace.
817+//
814 //nolint:revive // receiver required for interface consistency818 //nolint:revive // receiver required for interface consistency
815 func (uc *ManagePanesUseCase) CountPanes(ws *entity.Workspace) int {819 func (uc *ManagePanesUseCase) CountPanes(ws *entity.Workspace) int {
816 if ws == nil {820 if ws == nil {
M internal/application/usecase/manage_tabs.go +3 -0
@@ -176,6 +176,7 @@ func (uc *ManageTabsUseCase) Move(ctx context.Context, tabs *entity.TabList, tab
176176 }
177177
178178 // Rename changes a tab's custom name.
179+//
179180 //nolint:revive // receiver required for interface consistency
180181 func (uc *ManageTabsUseCase) Rename(ctx context.Context, tabs *entity.TabList, tabID entity.TabID, name string) error {
181182 log := logging.FromContext(ctx)
@@ -205,6 +206,7 @@ func (uc *ManageTabsUseCase) Rename(ctx context.Context, tabs *entity.TabList, t
205206
206207 // GetNext returns the next tab ID in the given direction.
207208 // direction: 1 for next, -1 for previous.
209+//
208210 //nolint:revive // receiver required for interface consistency
209211 func (uc *ManageTabsUseCase) GetNext(tabs *entity.TabList, direction int) entity.TabID {
210212 if tabs == nil || tabs.Count() == 0 {
@@ -293,6 +295,7 @@ func (uc *ManageTabsUseCase) SwitchToLastActive(ctx context.Context, tabs *entit
293295 }
294296
295297 // Pin toggles the pinned state of a tab.
298+//
296299 //nolint:revive // receiver required for interface consistency
297300 func (uc *ManageTabsUseCase) Pin(ctx context.Context, tabs *entity.TabList, tabID entity.TabID, pinned bool) error {
298301 log := logging.FromContext(ctx)
@@ -176,6 +176,7 @@ func (uc *ManageTabsUseCase) Move(ctx context.Context, tabs *entity.TabList, tab
176 }176 }
177 177
178 // Rename changes a tab's custom name.178 // Rename changes a tab's custom name.
179+//
179 //nolint:revive // receiver required for interface consistency180 //nolint:revive // receiver required for interface consistency
180 func (uc *ManageTabsUseCase) Rename(ctx context.Context, tabs *entity.TabList, tabID entity.TabID, name string) error {181 func (uc *ManageTabsUseCase) Rename(ctx context.Context, tabs *entity.TabList, tabID entity.TabID, name string) error {
181 log := logging.FromContext(ctx)182 log := logging.FromContext(ctx)
@@ -205,6 +206,7 @@ func (uc *ManageTabsUseCase) Rename(ctx context.Context, tabs *entity.TabList, t
205 206
206 // GetNext returns the next tab ID in the given direction.207 // GetNext returns the next tab ID in the given direction.
207 // direction: 1 for next, -1 for previous.208 // direction: 1 for next, -1 for previous.
209+//
208 //nolint:revive // receiver required for interface consistency210 //nolint:revive // receiver required for interface consistency
209 func (uc *ManageTabsUseCase) GetNext(tabs *entity.TabList, direction int) entity.TabID {211 func (uc *ManageTabsUseCase) GetNext(tabs *entity.TabList, direction int) entity.TabID {
210 if tabs == nil || tabs.Count() == 0 {212 if tabs == nil || tabs.Count() == 0 {
@@ -293,6 +295,7 @@ func (uc *ManageTabsUseCase) SwitchToLastActive(ctx context.Context, tabs *entit
293 }295 }
294 296
295 // Pin toggles the pinned state of a tab.297 // Pin toggles the pinned state of a tab.
298+//
296 //nolint:revive // receiver required for interface consistency299 //nolint:revive // receiver required for interface consistency
297 func (uc *ManageTabsUseCase) Pin(ctx context.Context, tabs *entity.TabList, tabID entity.TabID, pinned bool) error {300 func (uc *ManageTabsUseCase) Pin(ctx context.Context, tabs *entity.TabList, tabID entity.TabID, pinned bool) error {
298 log := logging.FromContext(ctx)301 log := logging.FromContext(ctx)
M internal/cli/cmd/root.go +1 -1
@@ -65,7 +65,7 @@ If a URL is provided, navigate to it. Otherwise, open the homepage.
6565 Examples:
6666 dumber browse # Open browser to homepage
6767 dumber browse example.com # Open browser to URL`,
68- Run: func(_ *cobra.Command, _ []string) {
68+ Run: func(_ *cobra.Command, _ []string) {
6969 // This is handled by main.go before cobra runs
7070 },
7171 }
@@ -65,7 +65,7 @@ If a URL is provided, navigate to it. Otherwise, open the homepage.
65 Examples:65 Examples:
66 dumber browse # Open browser to homepage66 dumber browse # Open browser to homepage
67 dumber browse example.com # Open browser to URL`,67 dumber browse example.com # Open browser to URL`,
68- Run: func(_ *cobra.Command, _ []string) {68+ Run: func(_ *cobra.Command, _ []string) {
69 // This is handled by main.go before cobra runs69 // This is handled by main.go before cobra runs
70 },70 },
71 }71 }
M internal/cli/model/stats.go +1 -1
@@ -236,7 +236,7 @@ func (m StatsModel) renderDailyActivity() string {
236236 // formatNumber formats a number for display.
237237 func formatNumber(n int64) string {
238238 const (
239- formatMillion = 1_000_000
239+ formatMillion = 1_000_000
240240 formatThousand = 1_000
241241 )
242242 switch {
@@ -236,7 +236,7 @@ func (m StatsModel) renderDailyActivity() string {
236 // formatNumber formats a number for display.236 // formatNumber formats a number for display.
237 func formatNumber(n int64) string {237 func formatNumber(n int64) string {
238 const (238 const (
239- formatMillion = 1_000_000239+ formatMillion = 1_000_000
240 formatThousand = 1_000240 formatThousand = 1_000
241 )241 )
242 switch {242 switch {
M internal/cli/styles/cleanup.go +1 -1
@@ -67,7 +67,7 @@ type CleanupModel struct {
6767 Ranges []CleanupRangeInfo
6868 Selected int
6969 Confirmed bool
70- Canceled bool
70+ Canceled bool
7171 theme *Theme
7272 }
7373
@@ -67,7 +67,7 @@ type CleanupModel struct {
67 Ranges []CleanupRangeInfo67 Ranges []CleanupRangeInfo
68 Selected int68 Selected int
69 Confirmed bool69 Confirmed bool
70- Canceled bool70+ Canceled bool
71 theme *Theme71 theme *Theme
72 }72 }
73 73
M internal/cli/styles/confirm.go +1 -1
@@ -11,7 +11,7 @@ type ConfirmModel struct {
1111 Message string
1212 Yes bool // Current selection
1313 Confirmed bool // User pressed enter
14- Canceled bool // User pressed escape
14+ Canceled bool // User pressed escape
1515 theme *Theme
1616 }
1717
@@ -11,7 +11,7 @@ type ConfirmModel struct {
11 Message string11 Message string
12 Yes bool // Current selection12 Yes bool // Current selection
13 Confirmed bool // User pressed enter13 Confirmed bool // User pressed enter
14- Canceled bool // User pressed escape14+ Canceled bool // User pressed escape
15 theme *Theme15 theme *Theme
16 }16 }
17 17
M internal/cli/styles/table.go +1 -1
@@ -70,7 +70,7 @@ func (d DomainStatsRow) ToRow() table.Row {
7070 // formatInt formats an integer for display.
7171 func formatInt(n int) string {
7272 const (
73- formatMillion = 1_000_000
73+ formatMillion = 1_000_000
7474 formatThousand = 1_000
7575 )
7676 switch {
@@ -70,7 +70,7 @@ func (d DomainStatsRow) ToRow() table.Row {
70 // formatInt formats an integer for display.70 // formatInt formats an integer for display.
71 func formatInt(n int) string {71 func formatInt(n int) string {
72 const (72 const (
73- formatMillion = 1_000_00073+ formatMillion = 1_000_000
74 formatThousand = 1_00074 formatThousand = 1_000
75 )75 )
76 switch {76 switch {
M internal/infrastructure/filtering/manager.go +2 -2
@@ -14,8 +14,8 @@ import (
1414 )
1515
1616 const (
17- storeDirPerm = 0o755
18- jsonDirPerm = 0o755
17+ storeDirPerm = 0o755
18+ jsonDirPerm = 0o755
1919 mergedFilePerm = 0o644
2020 )
2121
@@ -14,8 +14,8 @@ import (
14 )14 )
15 15
16 const (16 const (
17- storeDirPerm = 0o75517+ storeDirPerm = 0o755
18- jsonDirPerm = 0o75518+ jsonDirPerm = 0o755
19 mergedFilePerm = 0o64419 mergedFilePerm = 0o644
20 )20 )
21 21
M internal/infrastructure/media/diagnostics.go +1 -0
@@ -223,6 +223,7 @@ func (a *Adapter) checkVAAPI(ctx context.Context, r *port.MediaDiagnosticsResult
223223 }
224224
225225 // generateWarnings creates user-friendly warning messages.
226+//
226227 //nolint:revive // receiver required for interface consistency
227228 func (a *Adapter) generateWarnings(r *port.MediaDiagnosticsResult) {
228229 // Critical: GStreamer not installed
@@ -223,6 +223,7 @@ func (a *Adapter) checkVAAPI(ctx context.Context, r *port.MediaDiagnosticsResult
223 }223 }
224 224
225 // generateWarnings creates user-friendly warning messages.225 // generateWarnings creates user-friendly warning messages.
226+//
226 //nolint:revive // receiver required for interface consistency227 //nolint:revive // receiver required for interface consistency
227 func (a *Adapter) generateWarnings(r *port.MediaDiagnosticsResult) {228 func (a *Adapter) generateWarnings(r *port.MediaDiagnosticsResult) {
228 // Critical: GStreamer not installed229 // Critical: GStreamer not installed
M internal/infrastructure/webkit/scheme_handler.go +6 -6
@@ -77,10 +77,10 @@ type configAppearancePayload struct {
7777 }
7878
7979 type configPayload struct {
80- Appearance configAppearancePayload `json:"appearance"`
81- DefaultUIScale float64 `json:"default_ui_scale"`
82- DefaultSearchEngine string `json:"default_search_engine"`
83- SearchShortcuts map[string]config.SearchShortcut `json:"search_shortcuts"`
80+ Appearance configAppearancePayload `json:"appearance"`
81+ DefaultUIScale float64 `json:"default_ui_scale"`
82+ DefaultSearchEngine string `json:"default_search_engine"`
83+ SearchShortcuts map[string]config.SearchShortcut `json:"search_shortcuts"`
8484 }
8585
8686 // NewDumbSchemeHandler creates a new handler for the dumb:// scheme.
@@ -110,7 +110,7 @@ func (h *DumbSchemeHandler) SetAssets(assets embed.FS) {
110110 // registerDefaults sets up default page handlers.
111111 func (h *DumbSchemeHandler) registerDefaults() {
112112 // Error page (static fallback)
113-h.RegisterPage("/error", PageHandlerFunc(func(_ *SchemeRequest) *SchemeResponse {
113+ h.RegisterPage("/error", PageHandlerFunc(func(_ *SchemeRequest) *SchemeResponse {
114114 return &SchemeResponse{
115115 Data: []byte(errorPageHTML),
116116 ContentType: "text/html",
@@ -425,7 +425,7 @@ func (h *DumbSchemeHandler) RegisterWithContext(wkCtx *WebKitContext) {
425425 return
426426 }
427427
428-callback := webkit.URISchemeRequestCallback(func(reqPtr, _ uintptr) {
428+ callback := webkit.URISchemeRequestCallback(func(reqPtr, _ uintptr) {
429429 h.HandleRequest(reqPtr)
430430 })
431431
@@ -77,10 +77,10 @@ type configAppearancePayload struct {
77 }77 }
78 78
79 type configPayload struct {79 type configPayload struct {
80- Appearance configAppearancePayload `json:"appearance"`80+ Appearance configAppearancePayload `json:"appearance"`
81- DefaultUIScale float64 `json:"default_ui_scale"`81+ DefaultUIScale float64 `json:"default_ui_scale"`
82- DefaultSearchEngine string `json:"default_search_engine"`82+ DefaultSearchEngine string `json:"default_search_engine"`
83- SearchShortcuts map[string]config.SearchShortcut `json:"search_shortcuts"`83+ SearchShortcuts map[string]config.SearchShortcut `json:"search_shortcuts"`
84 }84 }
85 85
86 // NewDumbSchemeHandler creates a new handler for the dumb:// scheme.86 // NewDumbSchemeHandler creates a new handler for the dumb:// scheme.
@@ -110,7 +110,7 @@ func (h *DumbSchemeHandler) SetAssets(assets embed.FS) {
110 // registerDefaults sets up default page handlers.110 // registerDefaults sets up default page handlers.
111 func (h *DumbSchemeHandler) registerDefaults() {111 func (h *DumbSchemeHandler) registerDefaults() {
112 // Error page (static fallback)112 // Error page (static fallback)
113-h.RegisterPage("/error", PageHandlerFunc(func(_ *SchemeRequest) *SchemeResponse {113+ h.RegisterPage("/error", PageHandlerFunc(func(_ *SchemeRequest) *SchemeResponse {
114 return &SchemeResponse{114 return &SchemeResponse{
115 Data: []byte(errorPageHTML),115 Data: []byte(errorPageHTML),
116 ContentType: "text/html",116 ContentType: "text/html",
@@ -425,7 +425,7 @@ func (h *DumbSchemeHandler) RegisterWithContext(wkCtx *WebKitContext) {
425 return425 return
426 }426 }
427 427
428-callback := webkit.URISchemeRequestCallback(func(reqPtr, _ uintptr) {428+ callback := webkit.URISchemeRequestCallback(func(reqPtr, _ uintptr) {
429 h.HandleRequest(reqPtr)429 h.HandleRequest(reqPtr)
430 })430 })
431 431
M internal/infrastructure/webkit/settings.go +1 -1
@@ -64,7 +64,7 @@ func (sm *SettingsManager) applySettings(ctx context.Context, settings *webkit.S
6464 Str("sans_font", cfg.Appearance.SansFont).
6565 Str("rendering_mode", string(cfg.RenderingMode)).
6666 Bool("developer_extras", cfg.Debug.EnableDevTools).
67- Msg("settings applied")
67+ Msg("settings applied")
6868 }
6969
7070 func applyJavaScriptSettings(settings *webkit.Settings) {
@@ -64,7 +64,7 @@ func (sm *SettingsManager) applySettings(ctx context.Context, settings *webkit.S
64 Str("sans_font", cfg.Appearance.SansFont).64 Str("sans_font", cfg.Appearance.SansFont).
65 Str("rendering_mode", string(cfg.RenderingMode)).65 Str("rendering_mode", string(cfg.RenderingMode)).
66 Bool("developer_extras", cfg.Debug.EnableDevTools).66 Bool("developer_extras", cfg.Debug.EnableDevTools).
67- Msg("settings applied")67+ Msg("settings applied")
68 }68 }
69 69
70 func applyJavaScriptSettings(settings *webkit.Settings) {70 func applyJavaScriptSettings(settings *webkit.Settings) {
M internal/ui/component/omnibox.go +6 -6
@@ -20,12 +20,12 @@ import (
2020 )
2121
2222 const (
23- omniboxWidthPct = 0.8 // 80% of parent window width
24- omniboxMaxWidth = 800 // Maximum width in pixels
25- omniboxHeightPct = 0.6 // 60% of parent window height
26- omniboxMaxResults = 10
23+ omniboxWidthPct = 0.8 // 80% of parent window width
24+ omniboxMaxWidth = 800 // Maximum width in pixels
25+ omniboxHeightPct = 0.6 // 60% of parent window height
26+ omniboxMaxResults = 10
2727 omniboxTopMarginPct = 0.2 // 20% from top
28- debounceDelayMs = 150
28+ debounceDelayMs = 150
2929 )
3030
3131 // ViewMode distinguishes history search from favorites display.
@@ -308,7 +308,7 @@ func (o *Omnibox) setupKeyboardHandling() {
308308 // Set capture phase to intercept before entry
309309 controller.SetPropagationPhase(gtk.PhaseCaptureValue)
310310
311-keyPressedCb := func(_ gtk.EventControllerKey, keyval uint, _ uint, state gdk.ModifierType) bool {
311+ keyPressedCb := func(_ gtk.EventControllerKey, keyval uint, _ uint, state gdk.ModifierType) bool {
312312 return o.handleKeyPress(keyval, state)
313313 }
314314 controller.ConnectKeyPressed(&keyPressedCb)
@@ -20,12 +20,12 @@ import (
20 )20 )
21 21
22 const (22 const (
23- omniboxWidthPct = 0.8 // 80% of parent window width23+ omniboxWidthPct = 0.8 // 80% of parent window width
24- omniboxMaxWidth = 800 // Maximum width in pixels24+ omniboxMaxWidth = 800 // Maximum width in pixels
25- omniboxHeightPct = 0.6 // 60% of parent window height25+ omniboxHeightPct = 0.6 // 60% of parent window height
26- omniboxMaxResults = 1026+ omniboxMaxResults = 10
27 omniboxTopMarginPct = 0.2 // 20% from top27 omniboxTopMarginPct = 0.2 // 20% from top
28- debounceDelayMs = 15028+ debounceDelayMs = 150
29 )29 )
30 30
31 // ViewMode distinguishes history search from favorites display.31 // ViewMode distinguishes history search from favorites display.
@@ -308,7 +308,7 @@ func (o *Omnibox) setupKeyboardHandling() {
308 // Set capture phase to intercept before entry308 // Set capture phase to intercept before entry
309 controller.SetPropagationPhase(gtk.PhaseCaptureValue)309 controller.SetPropagationPhase(gtk.PhaseCaptureValue)
310 310
311-keyPressedCb := func(_ gtk.EventControllerKey, keyval uint, _ uint, state gdk.ModifierType) bool {311+ keyPressedCb := func(_ gtk.EventControllerKey, keyval uint, _ uint, state gdk.ModifierType) bool {
312 return o.handleKeyPress(keyval, state)312 return o.handleKeyPress(keyval, state)
313 }313 }
314 controller.ConnectKeyPressed(&keyPressedCb)314 controller.ConnectKeyPressed(&keyPressedCb)
M internal/ui/coordinator/workspace.go +1 -1
@@ -710,7 +710,7 @@ func (c *WorkspaceCoordinator) ClosePane(ctx context.Context) error {
710710 if siblingNode != nil {
711711 return siblingNode.ID
712712 }
713- return nilString
713+ return nilString
714714 }()).
715715 Bool("sibling_is_start", siblingIsStartChild).
716716 Bool("parent_is_start_in_grand", parentIsStartInGrand).
@@ -710,7 +710,7 @@ func (c *WorkspaceCoordinator) ClosePane(ctx context.Context) error {
710 if siblingNode != nil {710 if siblingNode != nil {
711 return siblingNode.ID711 return siblingNode.ID
712 }712 }
713- return nilString713+ return nilString
714 }()).714 }()).
715 Bool("sibling_is_start", siblingIsStartChild).715 Bool("sibling_is_start", siblingIsStartChild).
716 Bool("parent_is_start_in_grand", parentIsStartInGrand).716 Bool("parent_is_start_in_grand", parentIsStartInGrand).
M internal/ui/dispatcher/keyboard.go +35 -35
@@ -15,17 +15,17 @@ import (
1515
1616 // KeyboardDispatcher routes keyboard actions to appropriate coordinators.
1717 type KeyboardDispatcher struct {
18- tabCoord *coordinator.TabCoordinator
19- wsCoord *coordinator.WorkspaceCoordinator
20- navCoord *coordinator.NavigationCoordinator
21- zoomUC *usecase.ManageZoomUseCase
22- copyURLUC *usecase.CopyURLUseCase
18+ tabCoord *coordinator.TabCoordinator
19+ wsCoord *coordinator.WorkspaceCoordinator
20+ navCoord *coordinator.NavigationCoordinator
21+ zoomUC *usecase.ManageZoomUseCase
22+ copyURLUC *usecase.CopyURLUseCase
2323 actionHandlers map[input.Action]func(ctx context.Context) error
24- onQuit func()
25- onFindOpen func(ctx context.Context) error
26- onFindNext func(ctx context.Context) error
27- onFindPrev func(ctx context.Context) error
28- onFindClose func(ctx context.Context) error
24+ onQuit func()
25+ onFindOpen func(ctx context.Context) error
26+ onFindNext func(ctx context.Context) error
27+ onFindPrev func(ctx context.Context) error
28+ onFindClose func(ctx context.Context) error
2929 }
3030
3131 // NewKeyboardDispatcher creates a new KeyboardDispatcher.
@@ -78,12 +78,12 @@ func (d *KeyboardDispatcher) SetOnFindClose(fn func(ctx context.Context) error)
7878
7979 func (d *KeyboardDispatcher) initActionHandlers() {
8080 const (
81- firstTabIndex = 0
82- secondTabIndex = 1
83- thirdTabIndex = 2
84- fourthTabIndex = 3
85- fifthTabIndex = 4
86- sixthTabIndex = 5
81+ firstTabIndex = 0
82+ secondTabIndex = 1
83+ thirdTabIndex = 2
84+ fourthTabIndex = 3
85+ fifthTabIndex = 4
86+ sixthTabIndex = 5
8787 seventhTabIndex = 6
8888 eighthTabIndex = 7
8989 ninthTabIndex = 8
@@ -91,20 +91,20 @@ func (d *KeyboardDispatcher) initActionHandlers() {
9191 )
9292 d.actionHandlers = map[input.Action]func(ctx context.Context) error{
9393 // Tab actions
94- input.ActionNewTab: func(ctx context.Context) error { _, err := d.tabCoord.Create(ctx, "about:blank"); return err },
95- input.ActionCloseTab: d.tabCoord.Close,
96- input.ActionNextTab: d.tabCoord.SwitchNext,
97- input.ActionPreviousTab: d.tabCoord.SwitchPrev,
98- input.ActionSwitchLastTab: d.tabCoord.SwitchToLastActive,
99- input.ActionSwitchTabIndex1: func(ctx context.Context) error { return d.tabCoord.SwitchByIndex(ctx, firstTabIndex) },
100- input.ActionSwitchTabIndex2: func(ctx context.Context) error { return d.tabCoord.SwitchByIndex(ctx, secondTabIndex) },
101- input.ActionSwitchTabIndex3: func(ctx context.Context) error { return d.tabCoord.SwitchByIndex(ctx, thirdTabIndex) },
102- input.ActionSwitchTabIndex4: func(ctx context.Context) error { return d.tabCoord.SwitchByIndex(ctx, fourthTabIndex) },
103- input.ActionSwitchTabIndex5: func(ctx context.Context) error { return d.tabCoord.SwitchByIndex(ctx, fifthTabIndex) },
104- input.ActionSwitchTabIndex6: func(ctx context.Context) error { return d.tabCoord.SwitchByIndex(ctx, sixthTabIndex) },
105- input.ActionSwitchTabIndex7: func(ctx context.Context) error { return d.tabCoord.SwitchByIndex(ctx, seventhTabIndex) },
106- input.ActionSwitchTabIndex8: func(ctx context.Context) error { return d.tabCoord.SwitchByIndex(ctx, eighthTabIndex) },
107- input.ActionSwitchTabIndex9: func(ctx context.Context) error { return d.tabCoord.SwitchByIndex(ctx, ninthTabIndex) },
94+ input.ActionNewTab: func(ctx context.Context) error { _, err := d.tabCoord.Create(ctx, "about:blank"); return err },
95+ input.ActionCloseTab: d.tabCoord.Close,
96+ input.ActionNextTab: d.tabCoord.SwitchNext,
97+ input.ActionPreviousTab: d.tabCoord.SwitchPrev,
98+ input.ActionSwitchLastTab: d.tabCoord.SwitchToLastActive,
99+ input.ActionSwitchTabIndex1: func(ctx context.Context) error { return d.tabCoord.SwitchByIndex(ctx, firstTabIndex) },
100+ input.ActionSwitchTabIndex2: func(ctx context.Context) error { return d.tabCoord.SwitchByIndex(ctx, secondTabIndex) },
101+ input.ActionSwitchTabIndex3: func(ctx context.Context) error { return d.tabCoord.SwitchByIndex(ctx, thirdTabIndex) },
102+ input.ActionSwitchTabIndex4: func(ctx context.Context) error { return d.tabCoord.SwitchByIndex(ctx, fourthTabIndex) },
103+ input.ActionSwitchTabIndex5: func(ctx context.Context) error { return d.tabCoord.SwitchByIndex(ctx, fifthTabIndex) },
104+ input.ActionSwitchTabIndex6: func(ctx context.Context) error { return d.tabCoord.SwitchByIndex(ctx, sixthTabIndex) },
105+ input.ActionSwitchTabIndex7: func(ctx context.Context) error { return d.tabCoord.SwitchByIndex(ctx, seventhTabIndex) },
106+ input.ActionSwitchTabIndex8: func(ctx context.Context) error { return d.tabCoord.SwitchByIndex(ctx, eighthTabIndex) },
107+ input.ActionSwitchTabIndex9: func(ctx context.Context) error { return d.tabCoord.SwitchByIndex(ctx, ninthTabIndex) },
108108 input.ActionSwitchTabIndex10: func(ctx context.Context) error { return d.tabCoord.SwitchByIndex(ctx, tenthTabIndex) },
109109 input.ActionRenameTab: func(ctx context.Context) error {
110110 return d.logNoop(ctx, "rename tab action (not yet implemented)")
@@ -133,11 +133,11 @@ func (d *KeyboardDispatcher) initActionHandlers() {
133133 input.ActionZoomOut: func(ctx context.Context) error { return d.handleZoom(ctx, "out") },
134134 input.ActionZoomReset: func(ctx context.Context) error { return d.handleZoom(ctx, "reset") },
135135 // UI
136- input.ActionOpenOmnibox: d.navCoord.OpenOmnibox,
137- input.ActionOpenFind: d.handleFindOpen,
138- input.ActionFindNext: d.handleFindNext,
139- input.ActionFindPrev: d.handleFindPrev,
140- input.ActionCloseFind: d.handleFindClose,
136+ input.ActionOpenOmnibox: d.navCoord.OpenOmnibox,
137+ input.ActionOpenFind: d.handleFindOpen,
138+ input.ActionFindNext: d.handleFindNext,
139+ input.ActionFindPrev: d.handleFindPrev,
140+ input.ActionCloseFind: d.handleFindClose,
141141 input.ActionOpenDevTools: d.navCoord.OpenDevTools,
142142 input.ActionToggleFullscreen: func(ctx context.Context) error {
143143 return d.logNoop(ctx, "toggle fullscreen action (not yet implemented)")
@@ -15,17 +15,17 @@ import (
15 15
16 // KeyboardDispatcher routes keyboard actions to appropriate coordinators.16 // KeyboardDispatcher routes keyboard actions to appropriate coordinators.
17 type KeyboardDispatcher struct {17 type KeyboardDispatcher struct {
18- tabCoord *coordinator.TabCoordinator18+ tabCoord *coordinator.TabCoordinator
19- wsCoord *coordinator.WorkspaceCoordinator19+ wsCoord *coordinator.WorkspaceCoordinator
20- navCoord *coordinator.NavigationCoordinator20+ navCoord *coordinator.NavigationCoordinator
21- zoomUC *usecase.ManageZoomUseCase21+ zoomUC *usecase.ManageZoomUseCase
22- copyURLUC *usecase.CopyURLUseCase22+ copyURLUC *usecase.CopyURLUseCase
23 actionHandlers map[input.Action]func(ctx context.Context) error23 actionHandlers map[input.Action]func(ctx context.Context) error
24- onQuit func()24+ onQuit func()
25- onFindOpen func(ctx context.Context) error25+ onFindOpen func(ctx context.Context) error
26- onFindNext func(ctx context.Context) error26+ onFindNext func(ctx context.Context) error
27- onFindPrev func(ctx context.Context) error27+ onFindPrev func(ctx context.Context) error
28- onFindClose func(ctx context.Context) error28+ onFindClose func(ctx context.Context) error
29 }29 }
30 30
31 // NewKeyboardDispatcher creates a new KeyboardDispatcher.31 // NewKeyboardDispatcher creates a new KeyboardDispatcher.
@@ -78,12 +78,12 @@ func (d *KeyboardDispatcher) SetOnFindClose(fn func(ctx context.Context) error)
78 78
79 func (d *KeyboardDispatcher) initActionHandlers() {79 func (d *KeyboardDispatcher) initActionHandlers() {
80 const (80 const (
81- firstTabIndex = 081+ firstTabIndex = 0
82- secondTabIndex = 182+ secondTabIndex = 1
83- thirdTabIndex = 283+ thirdTabIndex = 2
84- fourthTabIndex = 384+ fourthTabIndex = 3
85- fifthTabIndex = 485+ fifthTabIndex = 4
86- sixthTabIndex = 586+ sixthTabIndex = 5
87 seventhTabIndex = 687 seventhTabIndex = 6
88 eighthTabIndex = 788 eighthTabIndex = 7
89 ninthTabIndex = 889 ninthTabIndex = 8
@@ -91,20 +91,20 @@ func (d *KeyboardDispatcher) initActionHandlers() {
91 )91 )
92 d.actionHandlers = map[input.Action]func(ctx context.Context) error{92 d.actionHandlers = map[input.Action]func(ctx context.Context) error{
93 // Tab actions93 // Tab actions
94- input.ActionNewTab: func(ctx context.Context) error { _, err := d.tabCoord.Create(ctx, "about:blank"); return err },94+ input.ActionNewTab: func(ctx context.Context) error { _, err := d.tabCoord.Create(ctx, "about:blank"); return err },
95- input.ActionCloseTab: d.tabCoord.Close,95+ input.ActionCloseTab: d.tabCoord.Close,
96- input.ActionNextTab: d.tabCoord.SwitchNext,96+ input.ActionNextTab: d.tabCoord.SwitchNext,
97- input.ActionPreviousTab: d.tabCoord.SwitchPrev,97+ input.ActionPreviousTab: d.tabCoord.SwitchPrev,
98- input.ActionSwitchLastTab: d.tabCoord.SwitchToLastActive,98+ input.ActionSwitchLastTab: d.tabCoord.SwitchToLastActive,
99- input.ActionSwitchTabIndex1: func(ctx context.Context) error { return d.tabCoord.SwitchByIndex(ctx, firstTabIndex) },99+ input.ActionSwitchTabIndex1: func(ctx context.Context) error { return d.tabCoord.SwitchByIndex(ctx, firstTabIndex) },
100- input.ActionSwitchTabIndex2: func(ctx context.Context) error { return d.tabCoord.SwitchByIndex(ctx, secondTabIndex) },100+ input.ActionSwitchTabIndex2: func(ctx context.Context) error { return d.tabCoord.SwitchByIndex(ctx, secondTabIndex) },
101- input.ActionSwitchTabIndex3: func(ctx context.Context) error { return d.tabCoord.SwitchByIndex(ctx, thirdTabIndex) },101+ input.ActionSwitchTabIndex3: func(ctx context.Context) error { return d.tabCoord.SwitchByIndex(ctx, thirdTabIndex) },
102- input.ActionSwitchTabIndex4: func(ctx context.Context) error { return d.tabCoord.SwitchByIndex(ctx, fourthTabIndex) },102+ input.ActionSwitchTabIndex4: func(ctx context.Context) error { return d.tabCoord.SwitchByIndex(ctx, fourthTabIndex) },
103- input.ActionSwitchTabIndex5: func(ctx context.Context) error { return d.tabCoord.SwitchByIndex(ctx, fifthTabIndex) },103+ input.ActionSwitchTabIndex5: func(ctx context.Context) error { return d.tabCoord.SwitchByIndex(ctx, fifthTabIndex) },
104- input.ActionSwitchTabIndex6: func(ctx context.Context) error { return d.tabCoord.SwitchByIndex(ctx, sixthTabIndex) },104+ input.ActionSwitchTabIndex6: func(ctx context.Context) error { return d.tabCoord.SwitchByIndex(ctx, sixthTabIndex) },
105- input.ActionSwitchTabIndex7: func(ctx context.Context) error { return d.tabCoord.SwitchByIndex(ctx, seventhTabIndex) },105+ input.ActionSwitchTabIndex7: func(ctx context.Context) error { return d.tabCoord.SwitchByIndex(ctx, seventhTabIndex) },
106- input.ActionSwitchTabIndex8: func(ctx context.Context) error { return d.tabCoord.SwitchByIndex(ctx, eighthTabIndex) },106+ input.ActionSwitchTabIndex8: func(ctx context.Context) error { return d.tabCoord.SwitchByIndex(ctx, eighthTabIndex) },
107- input.ActionSwitchTabIndex9: func(ctx context.Context) error { return d.tabCoord.SwitchByIndex(ctx, ninthTabIndex) },107+ input.ActionSwitchTabIndex9: func(ctx context.Context) error { return d.tabCoord.SwitchByIndex(ctx, ninthTabIndex) },
108 input.ActionSwitchTabIndex10: func(ctx context.Context) error { return d.tabCoord.SwitchByIndex(ctx, tenthTabIndex) },108 input.ActionSwitchTabIndex10: func(ctx context.Context) error { return d.tabCoord.SwitchByIndex(ctx, tenthTabIndex) },
109 input.ActionRenameTab: func(ctx context.Context) error {109 input.ActionRenameTab: func(ctx context.Context) error {
110 return d.logNoop(ctx, "rename tab action (not yet implemented)")110 return d.logNoop(ctx, "rename tab action (not yet implemented)")
@@ -133,11 +133,11 @@ func (d *KeyboardDispatcher) initActionHandlers() {
133 input.ActionZoomOut: func(ctx context.Context) error { return d.handleZoom(ctx, "out") },133 input.ActionZoomOut: func(ctx context.Context) error { return d.handleZoom(ctx, "out") },
134 input.ActionZoomReset: func(ctx context.Context) error { return d.handleZoom(ctx, "reset") },134 input.ActionZoomReset: func(ctx context.Context) error { return d.handleZoom(ctx, "reset") },
135 // UI135 // UI
136- input.ActionOpenOmnibox: d.navCoord.OpenOmnibox,136+ input.ActionOpenOmnibox: d.navCoord.OpenOmnibox,
137- input.ActionOpenFind: d.handleFindOpen,137+ input.ActionOpenFind: d.handleFindOpen,
138- input.ActionFindNext: d.handleFindNext,138+ input.ActionFindNext: d.handleFindNext,
139- input.ActionFindPrev: d.handleFindPrev,139+ input.ActionFindPrev: d.handleFindPrev,
140- input.ActionCloseFind: d.handleFindClose,140+ input.ActionCloseFind: d.handleFindClose,
141 input.ActionOpenDevTools: d.navCoord.OpenDevTools,141 input.ActionOpenDevTools: d.navCoord.OpenDevTools,
142 input.ActionToggleFullscreen: func(ctx context.Context) error {142 input.ActionToggleFullscreen: func(ctx context.Context) error {
143 return d.logNoop(ctx, "toggle fullscreen action (not yet implemented)")143 return d.logNoop(ctx, "toggle fullscreen action (not yet implemented)")
M internal/ui/input/shortcuts.go +50 -50
@@ -28,57 +28,57 @@ const (
2828 const modifierMask = ModCtrl | ModShift | ModAlt
2929
3030 var keyvalByName = map[string]uint{
31- "escape": uint(gdk.KEY_Escape),
32- "esc": uint(gdk.KEY_Escape),
33- "return": uint(gdk.KEY_Return),
34- "enter": uint(gdk.KEY_Return),
35- "tab": uint(gdk.KEY_Tab),
36- "space": uint(gdk.KEY_space),
37- "backspace": uint(gdk.KEY_BackSpace),
38- "delete": uint(gdk.KEY_Delete),
39- "del": uint(gdk.KEY_Delete),
40- "home": uint(gdk.KEY_Home),
41- "end": uint(gdk.KEY_End),
42- "pageup": uint(gdk.KEY_Page_Up),
43- "page_up": uint(gdk.KEY_Page_Up),
44- "pagedown": uint(gdk.KEY_Page_Down),
45- "page_down": uint(gdk.KEY_Page_Down),
46- "left": uint(gdk.KEY_Left),
47- "arrowleft": uint(gdk.KEY_Left),
48- "right": uint(gdk.KEY_Right),
31+ "escape": uint(gdk.KEY_Escape),
32+ "esc": uint(gdk.KEY_Escape),
33+ "return": uint(gdk.KEY_Return),
34+ "enter": uint(gdk.KEY_Return),
35+ "tab": uint(gdk.KEY_Tab),
36+ "space": uint(gdk.KEY_space),
37+ "backspace": uint(gdk.KEY_BackSpace),
38+ "delete": uint(gdk.KEY_Delete),
39+ "del": uint(gdk.KEY_Delete),
40+ "home": uint(gdk.KEY_Home),
41+ "end": uint(gdk.KEY_End),
42+ "pageup": uint(gdk.KEY_Page_Up),
43+ "page_up": uint(gdk.KEY_Page_Up),
44+ "pagedown": uint(gdk.KEY_Page_Down),
45+ "page_down": uint(gdk.KEY_Page_Down),
46+ "left": uint(gdk.KEY_Left),
47+ "arrowleft": uint(gdk.KEY_Left),
48+ "right": uint(gdk.KEY_Right),
4949 "arrowright": uint(gdk.KEY_Right),
50- "up": uint(gdk.KEY_Up),
51- "arrowup": uint(gdk.KEY_Up),
52- "down": uint(gdk.KEY_Down),
53- "arrowdown": uint(gdk.KEY_Down),
54- "f1": uint(gdk.KEY_F1),
55- "f2": uint(gdk.KEY_F2),
56- "f3": uint(gdk.KEY_F3),
57- "f4": uint(gdk.KEY_F4),
58- "f5": uint(gdk.KEY_F5),
59- "f6": uint(gdk.KEY_F6),
60- "f7": uint(gdk.KEY_F7),
61- "f8": uint(gdk.KEY_F8),
62- "f9": uint(gdk.KEY_F9),
63- "f10": uint(gdk.KEY_F10),
64- "f11": uint(gdk.KEY_F11),
65- "f12": uint(gdk.KEY_F12),
66- "plus": uint(gdk.KEY_plus),
67- "+": uint(gdk.KEY_plus),
68- "minus": uint(gdk.KEY_minus),
69- "-": uint(gdk.KEY_minus),
70- "equal": uint(gdk.KEY_equal),
71- "=": uint(gdk.KEY_equal),
72- "0": uint(gdk.KEY_0),
73- "1": uint(gdk.KEY_1),
74- "2": uint(gdk.KEY_2),
75- "3": uint(gdk.KEY_3),
76- "4": uint(gdk.KEY_4),
77- "5": uint(gdk.KEY_5),
78- "6": uint(gdk.KEY_6),
79- "7": uint(gdk.KEY_7),
80- "8": uint(gdk.KEY_8),
81- "9": uint(gdk.KEY_9),
50+ "up": uint(gdk.KEY_Up),
51+ "arrowup": uint(gdk.KEY_Up),
52+ "down": uint(gdk.KEY_Down),
53+ "arrowdown": uint(gdk.KEY_Down),
54+ "f1": uint(gdk.KEY_F1),
55+ "f2": uint(gdk.KEY_F2),
56+ "f3": uint(gdk.KEY_F3),
57+ "f4": uint(gdk.KEY_F4),
58+ "f5": uint(gdk.KEY_F5),
59+ "f6": uint(gdk.KEY_F6),
60+ "f7": uint(gdk.KEY_F7),
61+ "f8": uint(gdk.KEY_F8),
62+ "f9": uint(gdk.KEY_F9),
63+ "f10": uint(gdk.KEY_F10),
64+ "f11": uint(gdk.KEY_F11),
65+ "f12": uint(gdk.KEY_F12),
66+ "plus": uint(gdk.KEY_plus),
67+ "+": uint(gdk.KEY_plus),
68+ "minus": uint(gdk.KEY_minus),
69+ "-": uint(gdk.KEY_minus),
70+ "equal": uint(gdk.KEY_equal),
71+ "=": uint(gdk.KEY_equal),
72+ "0": uint(gdk.KEY_0),
73+ "1": uint(gdk.KEY_1),
74+ "2": uint(gdk.KEY_2),
75+ "3": uint(gdk.KEY_3),
76+ "4": uint(gdk.KEY_4),
77+ "5": uint(gdk.KEY_5),
78+ "6": uint(gdk.KEY_6),
79+ "7": uint(gdk.KEY_7),
80+ "8": uint(gdk.KEY_8),
81+ "9": uint(gdk.KEY_9),
8282 }
8383
8484 // KeyBinding represents a single key combination.
@@ -28,57 +28,57 @@ const (
28 const modifierMask = ModCtrl | ModShift | ModAlt28 const modifierMask = ModCtrl | ModShift | ModAlt
29 29
30 var keyvalByName = map[string]uint{30 var keyvalByName = map[string]uint{
31- "escape": uint(gdk.KEY_Escape),31+ "escape": uint(gdk.KEY_Escape),
32- "esc": uint(gdk.KEY_Escape),32+ "esc": uint(gdk.KEY_Escape),
33- "return": uint(gdk.KEY_Return),33+ "return": uint(gdk.KEY_Return),
34- "enter": uint(gdk.KEY_Return),34+ "enter": uint(gdk.KEY_Return),
35- "tab": uint(gdk.KEY_Tab),35+ "tab": uint(gdk.KEY_Tab),
36- "space": uint(gdk.KEY_space),36+ "space": uint(gdk.KEY_space),
37- "backspace": uint(gdk.KEY_BackSpace),37+ "backspace": uint(gdk.KEY_BackSpace),
38- "delete": uint(gdk.KEY_Delete),38+ "delete": uint(gdk.KEY_Delete),
39- "del": uint(gdk.KEY_Delete),39+ "del": uint(gdk.KEY_Delete),
40- "home": uint(gdk.KEY_Home),40+ "home": uint(gdk.KEY_Home),
41- "end": uint(gdk.KEY_End),41+ "end": uint(gdk.KEY_End),
42- "pageup": uint(gdk.KEY_Page_Up),42+ "pageup": uint(gdk.KEY_Page_Up),
43- "page_up": uint(gdk.KEY_Page_Up),43+ "page_up": uint(gdk.KEY_Page_Up),
44- "pagedown": uint(gdk.KEY_Page_Down),44+ "pagedown": uint(gdk.KEY_Page_Down),
45- "page_down": uint(gdk.KEY_Page_Down),45+ "page_down": uint(gdk.KEY_Page_Down),
46- "left": uint(gdk.KEY_Left),46+ "left": uint(gdk.KEY_Left),
47- "arrowleft": uint(gdk.KEY_Left),47+ "arrowleft": uint(gdk.KEY_Left),
48- "right": uint(gdk.KEY_Right),48+ "right": uint(gdk.KEY_Right),
49 "arrowright": uint(gdk.KEY_Right),49 "arrowright": uint(gdk.KEY_Right),
50- "up": uint(gdk.KEY_Up),50+ "up": uint(gdk.KEY_Up),
51- "arrowup": uint(gdk.KEY_Up),51+ "arrowup": uint(gdk.KEY_Up),
52- "down": uint(gdk.KEY_Down),52+ "down": uint(gdk.KEY_Down),
53- "arrowdown": uint(gdk.KEY_Down),53+ "arrowdown": uint(gdk.KEY_Down),
54- "f1": uint(gdk.KEY_F1),54+ "f1": uint(gdk.KEY_F1),
55- "f2": uint(gdk.KEY_F2),55+ "f2": uint(gdk.KEY_F2),
56- "f3": uint(gdk.KEY_F3),56+ "f3": uint(gdk.KEY_F3),
57- "f4": uint(gdk.KEY_F4),57+ "f4": uint(gdk.KEY_F4),
58- "f5": uint(gdk.KEY_F5),58+ "f5": uint(gdk.KEY_F5),
59- "f6": uint(gdk.KEY_F6),59+ "f6": uint(gdk.KEY_F6),
60- "f7": uint(gdk.KEY_F7),60+ "f7": uint(gdk.KEY_F7),
61- "f8": uint(gdk.KEY_F8),61+ "f8": uint(gdk.KEY_F8),
62- "f9": uint(gdk.KEY_F9),62+ "f9": uint(gdk.KEY_F9),
63- "f10": uint(gdk.KEY_F10),63+ "f10": uint(gdk.KEY_F10),
64- "f11": uint(gdk.KEY_F11),64+ "f11": uint(gdk.KEY_F11),
65- "f12": uint(gdk.KEY_F12),65+ "f12": uint(gdk.KEY_F12),
66- "plus": uint(gdk.KEY_plus),66+ "plus": uint(gdk.KEY_plus),
67- "+": uint(gdk.KEY_plus),67+ "+": uint(gdk.KEY_plus),
68- "minus": uint(gdk.KEY_minus),68+ "minus": uint(gdk.KEY_minus),
69- "-": uint(gdk.KEY_minus),69+ "-": uint(gdk.KEY_minus),
70- "equal": uint(gdk.KEY_equal),70+ "equal": uint(gdk.KEY_equal),
71- "=": uint(gdk.KEY_equal),71+ "=": uint(gdk.KEY_equal),
72- "0": uint(gdk.KEY_0),72+ "0": uint(gdk.KEY_0),
73- "1": uint(gdk.KEY_1),73+ "1": uint(gdk.KEY_1),
74- "2": uint(gdk.KEY_2),74+ "2": uint(gdk.KEY_2),
75- "3": uint(gdk.KEY_3),75+ "3": uint(gdk.KEY_3),
76- "4": uint(gdk.KEY_4),76+ "4": uint(gdk.KEY_4),
77- "5": uint(gdk.KEY_5),77+ "5": uint(gdk.KEY_5),
78- "6": uint(gdk.KEY_6),78+ "6": uint(gdk.KEY_6),
79- "7": uint(gdk.KEY_7),79+ "7": uint(gdk.KEY_7),
80- "8": uint(gdk.KEY_8),80+ "8": uint(gdk.KEY_8),
81- "9": uint(gdk.KEY_9),81+ "9": uint(gdk.KEY_9),
82 }82 }
83 83
84 // KeyBinding represents a single key combination.84 // KeyBinding represents a single key combination.

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