diff --git a/docs/Config.md b/docs/Config.md index 044ba10ea..0d2bb5e8c 100644 --- a/docs/Config.md +++ b/docs/Config.md @@ -487,6 +487,8 @@ keybinding: scrollRight: L gotoTop: < gotoBottom: '>' + gotoTop-alt: + gotoBottom-alt: toggleRangeSelect: v rangeSelectDown: rangeSelectUp: diff --git a/docs/keybindings/Keybindings_en.md b/docs/keybindings/Keybindings_en.md index 8dc8b60a8..c24bc736b 100644 --- a/docs/keybindings/Keybindings_en.md +++ b/docs/keybindings/Keybindings_en.md @@ -40,8 +40,8 @@ _Legend: `` means ctrl+b, `` means alt+b, `B` means shift+b_ |-----|--------|-------------| | `` , `` | Previous page | | | `` . `` | Next page | | -| `` < `` | Scroll to top | | -| `` > `` | Scroll to bottom | | +| `` < () `` | Scroll to top | | +| `` > () `` | Scroll to bottom | | | `` v `` | Toggle range select | | | `` `` | Range select down | | | `` `` | Range select up | | diff --git a/docs/keybindings/Keybindings_ja.md b/docs/keybindings/Keybindings_ja.md index 2e55fdee2..9d583a270 100644 --- a/docs/keybindings/Keybindings_ja.md +++ b/docs/keybindings/Keybindings_ja.md @@ -40,8 +40,8 @@ _Legend: `` means ctrl+b, `` means alt+b, `B` means shift+b_ |-----|--------|-------------| | `` , `` | 前のページ | | | `` . `` | 次のページ | | -| `` < `` | 最上部までスクロール | | -| `` > `` | 最下部までスクロール | | +| `` < () `` | 最上部までスクロール | | +| `` > () `` | 最下部までスクロール | | | `` v `` | 範囲選択を切り替え | | | `` `` | Range select down | | | `` `` | Range select up | | diff --git a/docs/keybindings/Keybindings_ko.md b/docs/keybindings/Keybindings_ko.md index e3c1c81ae..6ea53f3ce 100644 --- a/docs/keybindings/Keybindings_ko.md +++ b/docs/keybindings/Keybindings_ko.md @@ -40,8 +40,8 @@ _Legend: `` means ctrl+b, `` means alt+b, `B` means shift+b_ |-----|--------|-------------| | `` , `` | 이전 페이지 | | | `` . `` | 다음 페이지 | | -| `` < `` | 맨 위로 스크롤 | | -| `` > `` | 맨 아래로 스크롤 | | +| `` < () `` | 맨 위로 스크롤 | | +| `` > () `` | 맨 아래로 스크롤 | | | `` v `` | 드래그 선택 전환 | | | `` `` | Range select down | | | `` `` | Range select up | | diff --git a/docs/keybindings/Keybindings_nl.md b/docs/keybindings/Keybindings_nl.md index eb940bac2..1e3bd722d 100644 --- a/docs/keybindings/Keybindings_nl.md +++ b/docs/keybindings/Keybindings_nl.md @@ -40,8 +40,8 @@ _Legend: `` means ctrl+b, `` means alt+b, `B` means shift+b_ |-----|--------|-------------| | `` , `` | Vorige pagina | | | `` . `` | Volgende pagina | | -| `` < `` | Scroll naar boven | | -| `` > `` | Scroll naar beneden | | +| `` < () `` | Scroll naar boven | | +| `` > () `` | Scroll naar beneden | | | `` v `` | Toggle drag selecteer | | | `` `` | Range select down | | | `` `` | Range select up | | diff --git a/docs/keybindings/Keybindings_pl.md b/docs/keybindings/Keybindings_pl.md index a30007005..ab95bc0f9 100644 --- a/docs/keybindings/Keybindings_pl.md +++ b/docs/keybindings/Keybindings_pl.md @@ -40,8 +40,8 @@ _Legenda: `` oznacza ctrl+b, `` oznacza alt+b, `B` oznacza shift+b_ |-----|--------|-------------| | `` , `` | Poprzednia strona | | | `` . `` | Następna strona | | -| `` < `` | Przewiń do góry | | -| `` > `` | Przewiń do dołu | | +| `` < () `` | Przewiń do góry | | +| `` > () `` | Przewiń do dołu | | | `` v `` | Przełącz zaznaczenie zakresu | | | `` `` | Zaznacz zakres w dół | | | `` `` | Zaznacz zakres w górę | | diff --git a/docs/keybindings/Keybindings_pt.md b/docs/keybindings/Keybindings_pt.md index aa933c179..b09809519 100644 --- a/docs/keybindings/Keybindings_pt.md +++ b/docs/keybindings/Keybindings_pt.md @@ -40,8 +40,8 @@ _Legend: `` means ctrl+b, `` means alt+b, `B` means shift+b_ |-----|--------|-------------| | `` , `` | Previous page | | | `` . `` | Next page | | -| `` < `` | Scroll to top | | -| `` > `` | Scroll to bottom | | +| `` < () `` | Scroll to top | | +| `` > () `` | Scroll to bottom | | | `` v `` | Toggle range select | | | `` `` | Range select down | | | `` `` | Range select up | | diff --git a/docs/keybindings/Keybindings_ru.md b/docs/keybindings/Keybindings_ru.md index 28abe78eb..eeb73c3cb 100644 --- a/docs/keybindings/Keybindings_ru.md +++ b/docs/keybindings/Keybindings_ru.md @@ -40,8 +40,8 @@ _Связки клавиш_ |-----|--------|-------------| | `` , `` | Предыдущая страница | | | `` . `` | Следующая страница | | -| `` < `` | Пролистать наверх | | -| `` > `` | Прокрутить вниз | | +| `` < () `` | Пролистать наверх | | +| `` > () `` | Прокрутить вниз | | | `` v `` | Переключить выборку перетаскивания | | | `` `` | Range select down | | | `` `` | Range select up | | diff --git a/docs/keybindings/Keybindings_zh-CN.md b/docs/keybindings/Keybindings_zh-CN.md index 663dd98f0..de1cbb659 100644 --- a/docs/keybindings/Keybindings_zh-CN.md +++ b/docs/keybindings/Keybindings_zh-CN.md @@ -40,8 +40,8 @@ _图例:`` 意味着ctrl+b, `意味着Alt+b, `B` 意味着shift+b_ |-----|--------|-------------| | `` , `` | 上一页 | | | `` . `` | 下一页 | | -| `` < `` | 滚动到顶部 | | -| `` > `` | 滚动到底部 | | +| `` < () `` | 滚动到顶部 | | +| `` > () `` | 滚动到底部 | | | `` v `` | 切换拖动选择 | | | `` `` | 向下扩展选择范围 | | | `` `` | 向上扩展选择范围 | | diff --git a/docs/keybindings/Keybindings_zh-TW.md b/docs/keybindings/Keybindings_zh-TW.md index cb828d757..f6abf403a 100644 --- a/docs/keybindings/Keybindings_zh-TW.md +++ b/docs/keybindings/Keybindings_zh-TW.md @@ -40,8 +40,8 @@ _說明:`` 表示 Ctrl+B、`` 表示 Alt+B,`B`表示 Shift+B |-----|--------|-------------| | `` , `` | 上一頁 | | | `` . `` | 下一頁 | | -| `` < `` | 捲動到頂部 | | -| `` > `` | 捲動到底部 | | +| `` < () `` | 捲動到頂部 | | +| `` > () `` | 捲動到底部 | | | `` v `` | 切換拖曳選擇 | | | `` `` | Range select down | | | `` `` | Range select up | | diff --git a/pkg/config/user_config.go b/pkg/config/user_config.go index 30aad5c97..620701235 100644 --- a/pkg/config/user_config.go +++ b/pkg/config/user_config.go @@ -379,6 +379,8 @@ type KeybindingUniversalConfig struct { ScrollRight string `yaml:"scrollRight"` GotoTop string `yaml:"gotoTop"` GotoBottom string `yaml:"gotoBottom"` + GotoTopAlt string `yaml:"gotoTop-alt"` + GotoBottomAlt string `yaml:"gotoBottom-alt"` ToggleRangeSelect string `yaml:"toggleRangeSelect"` RangeSelectDown string `yaml:"rangeSelectDown"` RangeSelectUp string `yaml:"rangeSelectUp"` @@ -841,6 +843,8 @@ func GetDefaultConfig() *UserConfig { ScrollRight: "L", GotoTop: "<", GotoBottom: ">", + GotoTopAlt: "", + GotoBottomAlt: "", ToggleRangeSelect: "v", RangeSelectDown: "", RangeSelectUp: "", diff --git a/pkg/gui/command_log_panel.go b/pkg/gui/command_log_panel.go index fda8124c2..c4a5cb0c9 100644 --- a/pkg/gui/command_log_panel.go +++ b/pkg/gui/command_log_panel.go @@ -141,9 +141,9 @@ func (gui *Gui) getRandomTip() string { formattedKey(config.Universal.NextPage), ), fmt.Sprintf( - "You can jump to the top/bottom of a panel using '%s' and '%s'", - formattedKey(config.Universal.GotoTop), - formattedKey(config.Universal.GotoBottom), + "You can jump to the top/bottom of a panel using '%s (or %s)' and '%s (or %s)'", + formattedKey(config.Universal.GotoTop), formattedKey(config.Universal.GotoTopAlt), + formattedKey(config.Universal.GotoBottom), formattedKey(config.Universal.GotoBottomAlt), ), fmt.Sprintf( "To collapse/expand a directory, press '%s'", diff --git a/pkg/gui/controllers/list_controller.go b/pkg/gui/controllers/list_controller.go index d78e8c356..388f805f1 100644 --- a/pkg/gui/controllers/list_controller.go +++ b/pkg/gui/controllers/list_controller.go @@ -197,10 +197,12 @@ func (self *ListController) GetKeybindings(opts types.KeybindingsOpts) []*types. {Tag: "navigation", Key: opts.GetKey(opts.Config.Universal.NextItem), Handler: self.HandleNextLine}, {Tag: "navigation", Key: opts.GetKey(opts.Config.Universal.PrevPage), Handler: self.HandlePrevPage, Description: self.c.Tr.PrevPage}, {Tag: "navigation", Key: opts.GetKey(opts.Config.Universal.NextPage), Handler: self.HandleNextPage, Description: self.c.Tr.NextPage}, - {Tag: "navigation", Key: opts.GetKey(opts.Config.Universal.GotoTop), Handler: self.HandleGotoTop, Description: self.c.Tr.GotoTop}, + {Tag: "navigation", Key: opts.GetKey(opts.Config.Universal.GotoTop), Handler: self.HandleGotoTop, Description: self.c.Tr.GotoTop, Alternative: ""}, + {Tag: "navigation", Key: opts.GetKey(opts.Config.Universal.GotoBottom), Handler: self.HandleGotoBottom, Description: self.c.Tr.GotoBottom, Alternative: ""}, + {Tag: "navigation", Key: opts.GetKey(opts.Config.Universal.GotoTopAlt), Handler: self.HandleGotoTop}, + {Tag: "navigation", Key: opts.GetKey(opts.Config.Universal.GotoBottomAlt), Handler: self.HandleGotoBottom}, {Tag: "navigation", Key: opts.GetKey(opts.Config.Universal.ScrollLeft), Handler: self.HandleScrollLeft}, {Tag: "navigation", Key: opts.GetKey(opts.Config.Universal.ScrollRight), Handler: self.HandleScrollRight}, - {Tag: "navigation", Key: opts.GetKey(opts.Config.Universal.GotoBottom), Handler: self.HandleGotoBottom, Description: self.c.Tr.GotoBottom}, } if self.context.RangeSelectEnabled() { diff --git a/pkg/gui/controllers/patch_explorer_controller.go b/pkg/gui/controllers/patch_explorer_controller.go index 315d392ec..393343581 100644 --- a/pkg/gui/controllers/patch_explorer_controller.go +++ b/pkg/gui/controllers/patch_explorer_controller.go @@ -122,6 +122,16 @@ func (self *PatchExplorerController) GetKeybindings(opts types.KeybindingsOpts) Description: self.c.Tr.GotoBottom, Handler: self.withRenderAndFocus(self.HandleGotoBottom), }, + { + Tag: "navigation", + Key: opts.GetKey(opts.Config.Universal.GotoTopAlt), + Handler: self.withRenderAndFocus(self.HandleGotoTop), + }, + { + Tag: "navigation", + Key: opts.GetKey(opts.Config.Universal.GotoBottomAlt), + Handler: self.withRenderAndFocus(self.HandleGotoBottom), + }, { Tag: "navigation", Key: opts.GetKey(opts.Config.Universal.ScrollLeft), diff --git a/schema/config.json b/schema/config.json index fa61f920b..4fad20efd 100644 --- a/schema/config.json +++ b/schema/config.json @@ -1161,6 +1161,14 @@ "type": "string", "default": "\u003e" }, + "gotoTop-alt": { + "type": "string", + "default": "\u003chome\u003e" + }, + "gotoBottom-alt": { + "type": "string", + "default": "\u003cend\u003e" + }, "toggleRangeSelect": { "type": "string", "default": "v"