diff options
-rw-r--r-- | docs/Config.md | 1 | ||||
-rw-r--r-- | pkg/config/user_config.go | 1 | ||||
-rw-r--r-- | pkg/gui/keybindings.go | 6 |
3 files changed, 8 insertions, 0 deletions
diff --git a/docs/Config.md b/docs/Config.md index 691f791f5..8b7780775 100644 --- a/docs/Config.md +++ b/docs/Config.md @@ -113,6 +113,7 @@ keybinding: quit: 'q' quit-alt1: '<c-c>' # alternative/alias of quit return: '<esc>' # return to previous menu, will quit if there's nowhere to return + return-alt1: ';' # Can be set as a single character key to return to the previous menu level quitWithoutChangingDirectory: 'Q' togglePanel: '<tab>' # goto the next panel prevItem: '<up>' # go one line up diff --git a/pkg/config/user_config.go b/pkg/config/user_config.go index d0e909a2a..17d50e8a0 100644 --- a/pkg/config/user_config.go +++ b/pkg/config/user_config.go @@ -136,6 +136,7 @@ type KeybindingUniversalConfig struct { Quit string `yaml:"quit"` QuitAlt1 string `yaml:"quit-alt1"` Return string `yaml:"return"` + ReturnAlt1 string `yaml:"return-alt1"` QuitWithoutChangingDirectory string `yaml:"quitWithoutChangingDirectory"` TogglePanel string `yaml:"togglePanel"` PrevItem string `yaml:"prevItem"` diff --git a/pkg/gui/keybindings.go b/pkg/gui/keybindings.go index 8982a3056..383b52b32 100644 --- a/pkg/gui/keybindings.go +++ b/pkg/gui/keybindings.go @@ -75,6 +75,12 @@ func (self *Gui) GetInitialKeybindings() ([]*types.Binding, []*gocui.ViewMouseBi Handler: self.handleTopLevelReturn, }, { + ViewName: "", + Key: opts.GetKey(opts.Config.Universal.ReturnAlt1), + Modifier: gocui.ModNone, + Handler: self.handleTopLevelReturn, + }, + { ViewName: "", Key: opts.GetKey(opts.Config.Universal.OpenRecentRepos), Handler: self.handleCreateRecentReposMenu, |