diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2023-02-19 13:13:28 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2023-02-20 19:28:45 +1100 |
commit | 56424eb1aa70673b1983cad3949fa91c7bab3e1a (patch) | |
tree | 87dd471c25f41dc4b54dcd687c3b0e1648a9eb87 | |
parent | 38c7030b0f1cd62417e59091ebe68b4d387060a5 (diff) |
remove x keybinding for opening menu so we now only use '?'
-rw-r--r-- | docs/Config.md | 2 | ||||
-rw-r--r-- | docs/keybindings/Keybindings_en.md | 2 | ||||
-rw-r--r-- | docs/keybindings/Keybindings_ja.md | 2 | ||||
-rw-r--r-- | docs/keybindings/Keybindings_ko.md | 2 | ||||
-rw-r--r-- | docs/keybindings/Keybindings_nl.md | 2 | ||||
-rw-r--r-- | docs/keybindings/Keybindings_pl.md | 2 | ||||
-rw-r--r-- | docs/keybindings/Keybindings_zh.md | 2 | ||||
-rw-r--r-- | pkg/config/user_config.go | 2 | ||||
-rw-r--r-- | pkg/gui/keybindings.go | 14 | ||||
-rw-r--r-- | pkg/gui/view_helpers.go | 6 |
10 files changed, 19 insertions, 17 deletions
diff --git a/docs/Config.md b/docs/Config.md index 34ca5df4e..024785f64 100644 --- a/docs/Config.md +++ b/docs/Config.md @@ -136,7 +136,7 @@ keybinding: jumpToBlock: ['1', '2', '3', '4', '5'] # goto the Nth block / panel nextMatch: 'n' prevMatch: 'N' - optionMenu: 'x' # show help menu + optionMenu: null # show help menu optionMenu-alt1: '?' # show help menu select: '<space>' goInto: '<enter>' diff --git a/docs/keybindings/Keybindings_en.md b/docs/keybindings/Keybindings_en.md index 067ee61a3..8142f6b65 100644 --- a/docs/keybindings/Keybindings_en.md +++ b/docs/keybindings/Keybindings_en.md @@ -11,7 +11,7 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct <kbd>m</kbd>: view merge/rebase options <kbd>ctrl+p</kbd>: view custom patch options <kbd>R</kbd>: refresh - <kbd>x</kbd>: open menu + <kbd>?</kbd>: open menu <kbd>+</kbd>: next screen mode (normal/half/fullscreen) <kbd>_</kbd>: prev screen mode <kbd>ctrl+s</kbd>: view filter-by-path options diff --git a/docs/keybindings/Keybindings_ja.md b/docs/keybindings/Keybindings_ja.md index bbcd1eabe..60f2739df 100644 --- a/docs/keybindings/Keybindings_ja.md +++ b/docs/keybindings/Keybindings_ja.md @@ -11,7 +11,7 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct <kbd>m</kbd>: view merge/rebase options <kbd>ctrl+p</kbd>: view custom patch options <kbd>R</kbd>: リフレッシュ - <kbd>x</kbd>: メニューを開く + <kbd>?</kbd>: メニューを開く <kbd>+</kbd>: 次のスクリーンモード (normal/half/fullscreen) <kbd>_</kbd>: 前のスクリーンモード <kbd>ctrl+s</kbd>: view filter-by-path options diff --git a/docs/keybindings/Keybindings_ko.md b/docs/keybindings/Keybindings_ko.md index 325661e03..100241e74 100644 --- a/docs/keybindings/Keybindings_ko.md +++ b/docs/keybindings/Keybindings_ko.md @@ -11,7 +11,7 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct <kbd>m</kbd>: view merge/rebase options <kbd>ctrl+p</kbd>: 커스텀 Patch 옵션 보기 <kbd>R</kbd>: 새로고침 - <kbd>x</kbd>: 매뉴 열기 + <kbd>?</kbd>: 매뉴 열기 <kbd>+</kbd>: 다음 스크린 모드 (normal/half/fullscreen) <kbd>_</kbd>: 이전 스크린 모드 <kbd>ctrl+s</kbd>: view filter-by-path options diff --git a/docs/keybindings/Keybindings_nl.md b/docs/keybindings/Keybindings_nl.md index 6c5360c05..2f2276bf4 100644 --- a/docs/keybindings/Keybindings_nl.md +++ b/docs/keybindings/Keybindings_nl.md @@ -11,7 +11,7 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct <kbd>m</kbd>: bekijk merge/rebase opties <kbd>ctrl+p</kbd>: bekijk aangepaste patch opties <kbd>R</kbd>: verversen - <kbd>x</kbd>: open menu + <kbd>?</kbd>: open menu <kbd>+</kbd>: volgende scherm modus (normaal/half/groot) <kbd>_</kbd>: vorige scherm modus <kbd>ctrl+s</kbd>: bekijk scoping opties diff --git a/docs/keybindings/Keybindings_pl.md b/docs/keybindings/Keybindings_pl.md index 0d2ac0be1..be6368af3 100644 --- a/docs/keybindings/Keybindings_pl.md +++ b/docs/keybindings/Keybindings_pl.md @@ -11,7 +11,7 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct <kbd>m</kbd>: widok scalenia/opcje zmiany bazy <kbd>ctrl+p</kbd>: view custom patch options <kbd>R</kbd>: odśwież - <kbd>x</kbd>: open menu + <kbd>?</kbd>: open menu <kbd>+</kbd>: next screen mode (normal/half/fullscreen) <kbd>_</kbd>: prev screen mode <kbd>ctrl+s</kbd>: view filter-by-path options diff --git a/docs/keybindings/Keybindings_zh.md b/docs/keybindings/Keybindings_zh.md index e6ae31bbd..87fde590a 100644 --- a/docs/keybindings/Keybindings_zh.md +++ b/docs/keybindings/Keybindings_zh.md @@ -11,7 +11,7 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct <kbd>m</kbd>: 查看 合并/变基 选项 <kbd>ctrl+p</kbd>: 查看自定义补丁选项 <kbd>R</kbd>: 刷新 - <kbd>x</kbd>: 打开菜单 + <kbd>?</kbd>: 打开菜单 <kbd>+</kbd>: 下一屏模式(正常/半屏/全屏) <kbd>_</kbd>: 上一屏模式 <kbd>ctrl+s</kbd>: 查看按路径过滤选项 diff --git a/pkg/config/user_config.go b/pkg/config/user_config.go index 6fe880ce2..a4fc71579 100644 --- a/pkg/config/user_config.go +++ b/pkg/config/user_config.go @@ -450,7 +450,7 @@ func GetDefaultConfig() *UserConfig { NextMatch: "n", PrevMatch: "N", StartSearch: "/", - OptionMenu: "x", + OptionMenu: "", OptionMenuAlt1: "?", Select: "<space>", GoInto: "<enter>", diff --git a/pkg/gui/keybindings.go b/pkg/gui/keybindings.go index 35623b847..291c92288 100644 --- a/pkg/gui/keybindings.go +++ b/pkg/gui/keybindings.go @@ -145,17 +145,19 @@ func (self *Gui) GetInitialKeybindings() ([]*types.Binding, []*gocui.ViewMouseBi Description: self.c.Tr.LcRefresh, }, { - ViewName: "", - Key: opts.GetKey(opts.Config.Universal.OptionMenu), - Handler: self.handleCreateOptionsMenu, - Description: self.c.Tr.LcOpenMenu, - OpensMenu: true, + ViewName: "", + Key: opts.GetKey(opts.Config.Universal.OptionMenu), + Handler: self.handleCreateOptionsMenu, + OpensMenu: true, }, { ViewName: "", Key: opts.GetKey(opts.Config.Universal.OptionMenuAlt1), Modifier: gocui.ModNone, - Handler: self.handleCreateOptionsMenu, + // we have the description on the alt key and not the main key for legacy reasons + // (the original main key was 'x' but we've reassigned that to other purposes) + Description: self.c.Tr.LcOpenMenu, + Handler: self.handleCreateOptionsMenu, }, { ViewName: "status", diff --git a/pkg/gui/view_helpers.go b/pkg/gui/view_helpers.go index db4fe476d..c51942b03 100644 --- a/pkg/gui/view_helpers.go +++ b/pkg/gui/view_helpers.go @@ -107,9 +107,9 @@ func (gui *Gui) globalOptionsMap() map[string]string { return map[string]string{ fmt.Sprintf("%s/%s", keybindings.Label(keybindingConfig.Universal.ScrollUpMain), keybindings.Label(keybindingConfig.Universal.ScrollDownMain)): gui.c.Tr.LcScroll, fmt.Sprintf("%s %s %s %s", keybindings.Label(keybindingConfig.Universal.PrevBlock), keybindings.Label(keybindingConfig.Universal.NextBlock), keybindings.Label(keybindingConfig.Universal.PrevItem), keybindings.Label(keybindingConfig.Universal.NextItem)): gui.c.Tr.LcNavigate, - keybindings.Label(keybindingConfig.Universal.Return): gui.c.Tr.LcCancel, - keybindings.Label(keybindingConfig.Universal.Quit): gui.c.Tr.LcQuit, - keybindings.Label(keybindingConfig.Universal.OptionMenu): gui.c.Tr.LcMenu, + keybindings.Label(keybindingConfig.Universal.Return): gui.c.Tr.LcCancel, + keybindings.Label(keybindingConfig.Universal.Quit): gui.c.Tr.LcQuit, + keybindings.Label(keybindingConfig.Universal.OptionMenuAlt1): gui.c.Tr.LcMenu, fmt.Sprintf("%s-%s", keybindings.Label(keybindingConfig.Universal.JumpToBlock[0]), keybindings.Label(keybindingConfig.Universal.JumpToBlock[len(keybindingConfig.Universal.JumpToBlock)-1])): gui.c.Tr.LcJump, fmt.Sprintf("%s/%s", keybindings.Label(keybindingConfig.Universal.ScrollLeft), keybindings.Label(keybindingConfig.Universal.ScrollRight)): gui.c.Tr.LcScrollLeftRight, } |