diff --git a/pkg/gui/controllers/options_menu_action.go b/pkg/gui/controllers/options_menu_action.go index 01d4f1bb6..28819caba 100644 --- a/pkg/gui/controllers/options_menu_action.go +++ b/pkg/gui/controllers/options_menu_action.go @@ -51,6 +51,7 @@ func (self *OptionsMenuAction) Call() error { HideCancel: true, ColumnAlignment: []utils.Alignment{utils.AlignRight, utils.AlignLeft}, AllowFilteringKeybindings: true, + KeepConfirmKeybindings: true, }) } diff --git a/pkg/gui/menu_panel.go b/pkg/gui/menu_panel.go index ddd45f97e..324c171c0 100644 --- a/pkg/gui/menu_panel.go +++ b/pkg/gui/menu_panel.go @@ -35,7 +35,7 @@ func (gui *Gui) createMenu(opts types.CreateMenuOptions) error { maxColumnSize = max(maxColumnSize, len(item.LabelColumns)) // Remove all item keybindings that are the same as the confirm binding - if item.Key == confirmKey { + if item.Key == confirmKey && !opts.KeepConfirmKeybindings { item.Key = nil } } diff --git a/pkg/gui/types/common.go b/pkg/gui/types/common.go index bea52fbae..6f7087d8e 100644 --- a/pkg/gui/types/common.go +++ b/pkg/gui/types/common.go @@ -156,6 +156,7 @@ type CreateMenuOptions struct { HideCancel bool ColumnAlignment []utils.Alignment AllowFilteringKeybindings bool + KeepConfirmKeybindings bool // if true, the keybindings that match the confirm binding will not be removed from menu items } type CreatePopupPanelOpts struct {