Compare commits
1 Commits
v0.47.1
...
more-secti
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
56d230a876 |
@@ -45,11 +45,13 @@ func (self *ContextLinesController) GetKeybindings(opts types.KeybindingsOpts) [
|
||||
Key: opts.GetKey(opts.Config.Universal.IncreaseContextInDiffView),
|
||||
Handler: self.Increase,
|
||||
Description: self.c.Tr.IncreaseContextInDiffView,
|
||||
Tag: "diff",
|
||||
},
|
||||
{
|
||||
Key: opts.GetKey(opts.Config.Universal.DecreaseContextInDiffView),
|
||||
Handler: self.Decrease,
|
||||
Description: self.c.Tr.DecreaseContextInDiffView,
|
||||
Tag: "diff",
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -31,100 +31,119 @@ func (self *FilesController) GetKeybindings(opts types.KeybindingsOpts) []*types
|
||||
Key: opts.GetKey(opts.Config.Universal.Select),
|
||||
Handler: self.checkSelectedFileNode(self.press),
|
||||
Description: self.c.Tr.ToggleStaged,
|
||||
Tag: "file",
|
||||
},
|
||||
{
|
||||
Key: opts.GetKey(opts.Config.Files.OpenStatusFilter),
|
||||
Handler: self.handleStatusFilterPressed,
|
||||
Description: self.c.Tr.FileFilter,
|
||||
Tag: "filterDisplay",
|
||||
},
|
||||
{
|
||||
Key: opts.GetKey(opts.Config.Files.CommitChanges),
|
||||
Handler: self.c.Helpers().WorkingTree.HandleCommitPress,
|
||||
Description: self.c.Tr.CommitChanges,
|
||||
Tag: "commit",
|
||||
},
|
||||
{
|
||||
Key: opts.GetKey(opts.Config.Files.CommitChangesWithoutHook),
|
||||
Handler: self.c.Helpers().WorkingTree.HandleWIPCommitPress,
|
||||
Description: self.c.Tr.CommitChangesWithoutHook,
|
||||
Tag: "commit",
|
||||
},
|
||||
{
|
||||
Key: opts.GetKey(opts.Config.Files.AmendLastCommit),
|
||||
Handler: self.handleAmendCommitPress,
|
||||
Description: self.c.Tr.AmendLastCommit,
|
||||
Tag: "commit",
|
||||
},
|
||||
{
|
||||
Key: opts.GetKey(opts.Config.Files.CommitChangesWithEditor),
|
||||
Handler: self.c.Helpers().WorkingTree.HandleCommitEditorPress,
|
||||
Description: self.c.Tr.CommitChangesWithEditor,
|
||||
Tag: "commit",
|
||||
},
|
||||
{
|
||||
Key: opts.GetKey(opts.Config.Universal.Edit),
|
||||
Handler: self.checkSelectedFileNode(self.edit),
|
||||
Description: self.c.Tr.EditFile,
|
||||
Tag: "file",
|
||||
},
|
||||
{
|
||||
Key: opts.GetKey(opts.Config.Universal.OpenFile),
|
||||
Handler: self.Open,
|
||||
Description: self.c.Tr.OpenFile,
|
||||
Tag: "file",
|
||||
},
|
||||
{
|
||||
Key: opts.GetKey(opts.Config.Files.IgnoreFile),
|
||||
Handler: self.checkSelectedFileNode(self.ignoreOrExcludeMenu),
|
||||
Description: self.c.Tr.Actions.IgnoreExcludeFile,
|
||||
OpensMenu: true,
|
||||
Tag: "file",
|
||||
},
|
||||
{
|
||||
Key: opts.GetKey(opts.Config.Files.RefreshFiles),
|
||||
Handler: self.refresh,
|
||||
Description: self.c.Tr.RefreshFiles,
|
||||
Tag: "file",
|
||||
},
|
||||
{
|
||||
Key: opts.GetKey(opts.Config.Files.StashAllChanges),
|
||||
Handler: self.stash,
|
||||
Description: self.c.Tr.StashAllChanges,
|
||||
Tag: "stash",
|
||||
},
|
||||
{
|
||||
Key: opts.GetKey(opts.Config.Files.ViewStashOptions),
|
||||
Handler: self.createStashMenu,
|
||||
Description: self.c.Tr.ViewStashOptions,
|
||||
OpensMenu: true,
|
||||
Tag: "stash",
|
||||
},
|
||||
{
|
||||
Key: opts.GetKey(opts.Config.Files.ToggleStagedAll),
|
||||
Handler: self.toggleStagedAll,
|
||||
Description: self.c.Tr.ToggleStagedAll,
|
||||
Tag: "file",
|
||||
},
|
||||
{
|
||||
Key: opts.GetKey(opts.Config.Universal.GoInto),
|
||||
Handler: self.enter,
|
||||
Description: self.c.Tr.FileEnter,
|
||||
Tag: "file",
|
||||
},
|
||||
{
|
||||
Key: opts.GetKey(opts.Config.Commits.ViewResetOptions),
|
||||
Handler: self.createResetToUpstreamMenu,
|
||||
Description: self.c.Tr.ViewResetToUpstreamOptions,
|
||||
OpensMenu: true,
|
||||
Tag: "file",
|
||||
},
|
||||
{
|
||||
Key: opts.GetKey(opts.Config.Files.ViewResetOptions),
|
||||
Handler: self.createResetMenu,
|
||||
Description: self.c.Tr.ViewResetOptions,
|
||||
OpensMenu: true,
|
||||
Tag: "file",
|
||||
},
|
||||
{
|
||||
Key: opts.GetKey(opts.Config.Files.ToggleTreeView),
|
||||
Handler: self.toggleTreeView,
|
||||
Description: self.c.Tr.ToggleTreeView,
|
||||
Tag: "filterDisplay",
|
||||
},
|
||||
{
|
||||
Key: opts.GetKey(opts.Config.Files.OpenMergeTool),
|
||||
Handler: self.c.Helpers().WorkingTree.OpenMergeTool,
|
||||
Description: self.c.Tr.OpenMergeTool,
|
||||
Tag: "file",
|
||||
},
|
||||
{
|
||||
Key: opts.GetKey(opts.Config.Files.Fetch),
|
||||
Handler: self.fetch,
|
||||
Description: self.c.Tr.Fetch,
|
||||
Tag: "sync",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@ func (self *FilesRemoveController) GetKeybindings(opts types.KeybindingsOpts) []
|
||||
Handler: self.checkSelectedFileNode(self.remove),
|
||||
Description: self.c.Tr.ViewDiscardOptions,
|
||||
OpensMenu: true,
|
||||
Tag: "file",
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -25,39 +25,46 @@ func (self *GlobalController) GetKeybindings(opts types.KeybindingsOpts) []*type
|
||||
Key: opts.GetKey(opts.Config.Universal.ExecuteCustomCommand),
|
||||
Handler: self.customCommand,
|
||||
Description: self.c.Tr.ExecuteCustomCommand,
|
||||
Tag: "customCommands",
|
||||
},
|
||||
{
|
||||
Key: opts.GetKey(opts.Config.Universal.CreatePatchOptionsMenu),
|
||||
Handler: self.createCustomPatchOptionsMenu,
|
||||
Description: self.c.Tr.ViewPatchOptions,
|
||||
OpensMenu: true,
|
||||
Tag: "customPatch",
|
||||
},
|
||||
{
|
||||
Key: opts.GetKey(opts.Config.Universal.CreateRebaseOptionsMenu),
|
||||
Handler: self.c.Helpers().MergeAndRebase.CreateRebaseOptionsMenu,
|
||||
Description: self.c.Tr.ViewMergeRebaseOptions,
|
||||
OpensMenu: true,
|
||||
Tag: "rebase",
|
||||
},
|
||||
{
|
||||
Key: opts.GetKey(opts.Config.Universal.Refresh),
|
||||
Handler: self.refresh,
|
||||
Description: self.c.Tr.Refresh,
|
||||
Tag: "misc",
|
||||
},
|
||||
{
|
||||
Key: opts.GetKey(opts.Config.Universal.NextScreenMode),
|
||||
Handler: self.nextScreenMode,
|
||||
Description: self.c.Tr.NextScreenMode,
|
||||
Tag: "filterDisplay",
|
||||
},
|
||||
{
|
||||
Key: opts.GetKey(opts.Config.Universal.PrevScreenMode),
|
||||
Handler: self.prevScreenMode,
|
||||
Description: self.c.Tr.PrevScreenMode,
|
||||
Tag: "filterDisplay",
|
||||
},
|
||||
{
|
||||
ViewName: "",
|
||||
Key: opts.GetKey(opts.Config.Universal.OptionMenu),
|
||||
Handler: self.createOptionsMenu,
|
||||
OpensMenu: true,
|
||||
Tag: "misc",
|
||||
},
|
||||
{
|
||||
ViewName: "",
|
||||
@@ -67,6 +74,7 @@ func (self *GlobalController) GetKeybindings(opts types.KeybindingsOpts) []*type
|
||||
// (the original main key was 'x' but we've reassigned that to other purposes)
|
||||
Description: self.c.Tr.OpenMenu,
|
||||
Handler: self.createOptionsMenu,
|
||||
Tag: "misc",
|
||||
},
|
||||
{
|
||||
ViewName: "",
|
||||
@@ -74,43 +82,51 @@ func (self *GlobalController) GetKeybindings(opts types.KeybindingsOpts) []*type
|
||||
Handler: self.createFilteringMenu,
|
||||
Description: self.c.Tr.OpenFilteringMenu,
|
||||
OpensMenu: true,
|
||||
Tag: "filterDisplay",
|
||||
},
|
||||
{
|
||||
Key: opts.GetKey(opts.Config.Universal.DiffingMenu),
|
||||
Handler: self.createDiffingMenu,
|
||||
Description: self.c.Tr.OpenDiffingMenu,
|
||||
OpensMenu: true,
|
||||
Tag: "diff",
|
||||
},
|
||||
{
|
||||
Key: opts.GetKey(opts.Config.Universal.DiffingMenuAlt),
|
||||
Handler: self.createDiffingMenu,
|
||||
Description: self.c.Tr.OpenDiffingMenu,
|
||||
OpensMenu: true,
|
||||
Tag: "diff",
|
||||
},
|
||||
{
|
||||
Key: opts.GetKey(opts.Config.Universal.Quit),
|
||||
Modifier: gocui.ModNone,
|
||||
Handler: self.quit,
|
||||
Tag: "misc",
|
||||
},
|
||||
{
|
||||
Key: opts.GetKey(opts.Config.Universal.QuitAlt1),
|
||||
Modifier: gocui.ModNone,
|
||||
Handler: self.quit,
|
||||
Tag: "misc",
|
||||
},
|
||||
{
|
||||
Key: opts.GetKey(opts.Config.Universal.QuitWithoutChangingDirectory),
|
||||
Modifier: gocui.ModNone,
|
||||
Handler: self.quitWithoutChangingDirectory,
|
||||
Tag: "misc",
|
||||
},
|
||||
{
|
||||
Key: opts.GetKey(opts.Config.Universal.Return),
|
||||
Modifier: gocui.ModNone,
|
||||
Handler: self.escape,
|
||||
Tag: "navigation",
|
||||
},
|
||||
{
|
||||
Key: opts.GetKey(opts.Config.Universal.ToggleWhitespaceInDiffView),
|
||||
Handler: self.toggleWhitespace,
|
||||
Description: self.c.Tr.ToggleWhitespaceInDiffView,
|
||||
Tag: "diff",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,11 +18,31 @@ func (self *OptionsMenuAction) Call() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
local, global, navigation := self.getBindings(ctx)
|
||||
headingMap := map[string]string{
|
||||
"local": self.c.Tr.KeybindingsMenuSectionLocal,
|
||||
"global": self.c.Tr.KeybindingsMenuSectionGlobal,
|
||||
"navigation": self.c.Tr.KeybindingsMenuSectionNavigation,
|
||||
"file": "File",
|
||||
"workingTree": "Working tree",
|
||||
"commit": "Commit",
|
||||
"stash": "Stash",
|
||||
"filterDisplay": "Filter/Display",
|
||||
"sync": "Sync",
|
||||
"customCommands": "Custom commands",
|
||||
"customPatch": "Custom patch",
|
||||
"rebase": "Rebase",
|
||||
"misc": "Miscellaneous",
|
||||
"diff": "Diff",
|
||||
}
|
||||
|
||||
menuItems := []*types.MenuItem{}
|
||||
|
||||
appendBindings := func(bindings []*types.Binding, section *types.MenuSection) {
|
||||
for groupKey, bindings := range self.getBindingGroups(ctx) {
|
||||
section := &types.MenuSection{
|
||||
Title: headingMap[groupKey],
|
||||
Column: 1,
|
||||
}
|
||||
|
||||
menuItems = append(menuItems,
|
||||
lo.Map(bindings, func(binding *types.Binding, _ int) *types.MenuItem {
|
||||
return &types.MenuItem{
|
||||
@@ -42,10 +62,6 @@ func (self *OptionsMenuAction) Call() error {
|
||||
})...)
|
||||
}
|
||||
|
||||
appendBindings(local, &types.MenuSection{Title: self.c.Tr.KeybindingsMenuSectionLocal, Column: 1})
|
||||
appendBindings(global, &types.MenuSection{Title: self.c.Tr.KeybindingsMenuSectionGlobal, Column: 1})
|
||||
appendBindings(navigation, &types.MenuSection{Title: self.c.Tr.KeybindingsMenuSectionNavigation, Column: 1})
|
||||
|
||||
return self.c.Menu(types.CreateMenuOptions{
|
||||
Title: self.c.Tr.Keybindings,
|
||||
Items: menuItems,
|
||||
@@ -54,25 +70,26 @@ func (self *OptionsMenuAction) Call() error {
|
||||
})
|
||||
}
|
||||
|
||||
// Returns three slices of bindings: local, global, and navigation
|
||||
func (self *OptionsMenuAction) getBindings(context types.Context) ([]*types.Binding, []*types.Binding, []*types.Binding) {
|
||||
var bindingsGlobal, bindingsPanel, bindingsNavigation []*types.Binding
|
||||
|
||||
func (self *OptionsMenuAction) getBindingGroups(context types.Context) map[string][]*types.Binding {
|
||||
bindings, _ := self.c.GetInitialKeybindingsWithCustomCommands()
|
||||
|
||||
result := map[string][]*types.Binding{}
|
||||
appendToGroup := func(groupKey string, binding *types.Binding) {
|
||||
if _, ok := result[groupKey]; !ok {
|
||||
result[groupKey] = []*types.Binding{}
|
||||
}
|
||||
result[groupKey] = append(result[groupKey], binding)
|
||||
}
|
||||
|
||||
for _, binding := range bindings {
|
||||
if keybindings.LabelFromKey(binding.Key) != "" && binding.Description != "" {
|
||||
if binding.ViewName == "" {
|
||||
bindingsGlobal = append(bindingsGlobal, binding)
|
||||
} else if binding.Tag == "navigation" {
|
||||
bindingsNavigation = append(bindingsNavigation, binding)
|
||||
} else if binding.ViewName == context.GetViewName() {
|
||||
bindingsPanel = append(bindingsPanel, binding)
|
||||
if binding.ViewName == context.GetViewName() || binding.ViewName == "" {
|
||||
appendToGroup(binding.Tag, binding)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return uniqueBindings(bindingsPanel), uniqueBindings(bindingsGlobal), uniqueBindings(bindingsNavigation)
|
||||
return result
|
||||
}
|
||||
|
||||
// We shouldn't really need to do this. We should define alternative keys for the same
|
||||
|
||||
@@ -39,6 +39,7 @@ func (self *SearchController) GetKeybindings(opts types.KeybindingsOpts) []*type
|
||||
Key: opts.GetKey(opts.Config.Universal.StartSearch),
|
||||
Handler: self.OpenSearchPrompt,
|
||||
Description: self.c.Tr.StartSearch,
|
||||
Tag: "filterDisplay",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,11 +33,13 @@ func (self *SyncController) GetKeybindings(opts types.KeybindingsOpts) []*types.
|
||||
Key: opts.GetKey(opts.Config.Universal.Push),
|
||||
Handler: opts.Guards.NoPopupPanel(self.HandlePush),
|
||||
Description: self.c.Tr.Push,
|
||||
Tag: "sync",
|
||||
},
|
||||
{
|
||||
Key: opts.GetKey(opts.Config.Universal.Pull),
|
||||
Handler: opts.Guards.NoPopupPanel(self.HandlePull),
|
||||
Description: self.c.Tr.Pull,
|
||||
Tag: "sync",
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -57,12 +57,14 @@ func (self *UndoController) GetKeybindings(opts types.KeybindingsOpts) []*types.
|
||||
Handler: self.reflogUndo,
|
||||
Description: self.c.Tr.UndoReflog,
|
||||
Tooltip: self.c.Tr.UndoTooltip,
|
||||
Tag: "misc",
|
||||
},
|
||||
{
|
||||
Key: opts.GetKey(opts.Config.Universal.Redo),
|
||||
Handler: self.reflogRedo,
|
||||
Description: self.c.Tr.RedoReflog,
|
||||
Tooltip: self.c.Tr.RedoTooltip,
|
||||
Tag: "misc",
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -83,6 +83,7 @@ func (self *Gui) GetInitialKeybindings() ([]*types.Binding, []*gocui.ViewMouseBi
|
||||
Key: opts.GetKey(opts.Config.Universal.OpenRecentRepos),
|
||||
Handler: self.helpers.Repos.CreateRecentReposMenu,
|
||||
Description: self.c.Tr.SwitchRepo,
|
||||
Tag: "misc",
|
||||
},
|
||||
{
|
||||
ViewName: "",
|
||||
@@ -90,6 +91,7 @@ func (self *Gui) GetInitialKeybindings() ([]*types.Binding, []*gocui.ViewMouseBi
|
||||
Handler: self.scrollUpMain,
|
||||
Alternative: "fn+up/shift+k",
|
||||
Description: self.c.Tr.ScrollUpMainPanel,
|
||||
Tag: "navigation",
|
||||
},
|
||||
{
|
||||
ViewName: "",
|
||||
@@ -97,18 +99,21 @@ func (self *Gui) GetInitialKeybindings() ([]*types.Binding, []*gocui.ViewMouseBi
|
||||
Handler: self.scrollDownMain,
|
||||
Alternative: "fn+down/shift+j",
|
||||
Description: self.c.Tr.ScrollDownMainPanel,
|
||||
Tag: "navigation",
|
||||
},
|
||||
{
|
||||
ViewName: "",
|
||||
Key: opts.GetKey(opts.Config.Universal.ScrollUpMainAlt1),
|
||||
Modifier: gocui.ModNone,
|
||||
Handler: self.scrollUpMain,
|
||||
Tag: "navigation",
|
||||
},
|
||||
{
|
||||
ViewName: "",
|
||||
Key: opts.GetKey(opts.Config.Universal.ScrollDownMainAlt1),
|
||||
Modifier: gocui.ModNone,
|
||||
Handler: self.scrollDownMain,
|
||||
Tag: "navigation",
|
||||
},
|
||||
{
|
||||
ViewName: "",
|
||||
@@ -127,24 +132,28 @@ func (self *Gui) GetInitialKeybindings() ([]*types.Binding, []*gocui.ViewMouseBi
|
||||
Key: opts.GetKey(opts.Config.Universal.CopyToClipboard),
|
||||
Handler: self.handleCopySelectedSideContextItemToClipboard,
|
||||
Description: self.c.Tr.CopyFileNameToClipboard,
|
||||
Tag: "misc",
|
||||
},
|
||||
{
|
||||
ViewName: "localBranches",
|
||||
Key: opts.GetKey(opts.Config.Universal.CopyToClipboard),
|
||||
Handler: self.handleCopySelectedSideContextItemToClipboard,
|
||||
Description: self.c.Tr.CopyBranchNameToClipboard,
|
||||
Tag: "misc",
|
||||
},
|
||||
{
|
||||
ViewName: "remoteBranches",
|
||||
Key: opts.GetKey(opts.Config.Universal.CopyToClipboard),
|
||||
Handler: self.handleCopySelectedSideContextItemToClipboard,
|
||||
Description: self.c.Tr.CopyBranchNameToClipboard,
|
||||
Tag: "misc",
|
||||
},
|
||||
{
|
||||
ViewName: "commits",
|
||||
Key: opts.GetKey(opts.Config.Universal.CopyToClipboard),
|
||||
Handler: self.handleCopySelectedSideContextItemToClipboard,
|
||||
Description: self.c.Tr.CopyCommitShaToClipboard,
|
||||
Tag: "misc",
|
||||
},
|
||||
{
|
||||
ViewName: "commits",
|
||||
@@ -157,12 +166,14 @@ func (self *Gui) GetInitialKeybindings() ([]*types.Binding, []*gocui.ViewMouseBi
|
||||
Key: opts.GetKey(opts.Config.Universal.CopyToClipboard),
|
||||
Handler: self.handleCopySelectedSideContextItemToClipboard,
|
||||
Description: self.c.Tr.CopyCommitShaToClipboard,
|
||||
Tag: "misc",
|
||||
},
|
||||
{
|
||||
ViewName: "subCommits",
|
||||
Key: opts.GetKey(opts.Config.Universal.CopyToClipboard),
|
||||
Handler: self.handleCopySelectedSideContextItemToClipboard,
|
||||
Description: self.c.Tr.CopyCommitShaToClipboard,
|
||||
Tag: "misc",
|
||||
},
|
||||
{
|
||||
ViewName: "information",
|
||||
@@ -175,6 +186,7 @@ func (self *Gui) GetInitialKeybindings() ([]*types.Binding, []*gocui.ViewMouseBi
|
||||
Key: opts.GetKey(opts.Config.Universal.CopyToClipboard),
|
||||
Handler: self.handleCopySelectedSideContextItemToClipboard,
|
||||
Description: self.c.Tr.CopyCommitFileNameToClipboard,
|
||||
Tag: "misc",
|
||||
},
|
||||
{
|
||||
ViewName: "",
|
||||
@@ -182,18 +194,21 @@ func (self *Gui) GetInitialKeybindings() ([]*types.Binding, []*gocui.ViewMouseBi
|
||||
Handler: self.handleCreateExtrasMenuPanel,
|
||||
Description: self.c.Tr.OpenExtrasMenu,
|
||||
OpensMenu: true,
|
||||
Tag: "misc",
|
||||
},
|
||||
{
|
||||
ViewName: "secondary",
|
||||
Key: gocui.MouseWheelUp,
|
||||
Modifier: gocui.ModNone,
|
||||
Handler: self.scrollUpSecondary,
|
||||
Tag: "navigation",
|
||||
},
|
||||
{
|
||||
ViewName: "secondary",
|
||||
Key: gocui.MouseWheelDown,
|
||||
Modifier: gocui.ModNone,
|
||||
Handler: self.scrollDownSecondary,
|
||||
Tag: "navigation",
|
||||
},
|
||||
{
|
||||
ViewName: "main",
|
||||
@@ -201,6 +216,7 @@ func (self *Gui) GetInitialKeybindings() ([]*types.Binding, []*gocui.ViewMouseBi
|
||||
Handler: self.scrollDownMain,
|
||||
Description: self.c.Tr.ScrollDown,
|
||||
Alternative: "fn+up",
|
||||
Tag: "navigation",
|
||||
},
|
||||
{
|
||||
ViewName: "main",
|
||||
@@ -208,87 +224,96 @@ func (self *Gui) GetInitialKeybindings() ([]*types.Binding, []*gocui.ViewMouseBi
|
||||
Handler: self.scrollUpMain,
|
||||
Description: self.c.Tr.ScrollUp,
|
||||
Alternative: "fn+down",
|
||||
Tag: "navigation",
|
||||
},
|
||||
{
|
||||
ViewName: "secondary",
|
||||
Key: gocui.MouseWheelUp,
|
||||
Modifier: gocui.ModNone,
|
||||
Handler: self.scrollUpSecondary,
|
||||
Tag: "navigation",
|
||||
},
|
||||
{
|
||||
ViewName: "confirmation",
|
||||
Key: opts.GetKey(opts.Config.Universal.PrevItem),
|
||||
Modifier: gocui.ModNone,
|
||||
Handler: self.scrollUpConfirmationPanel,
|
||||
Tag: "navigation",
|
||||
},
|
||||
{
|
||||
ViewName: "confirmation",
|
||||
Key: opts.GetKey(opts.Config.Universal.NextItem),
|
||||
Modifier: gocui.ModNone,
|
||||
Handler: self.scrollDownConfirmationPanel,
|
||||
Tag: "navigation",
|
||||
},
|
||||
{
|
||||
ViewName: "confirmation",
|
||||
Key: opts.GetKey(opts.Config.Universal.PrevItemAlt),
|
||||
Modifier: gocui.ModNone,
|
||||
Handler: self.scrollUpConfirmationPanel,
|
||||
Tag: "navigation",
|
||||
},
|
||||
{
|
||||
ViewName: "confirmation",
|
||||
Key: opts.GetKey(opts.Config.Universal.NextItemAlt),
|
||||
Modifier: gocui.ModNone,
|
||||
Handler: self.scrollDownConfirmationPanel,
|
||||
Tag: "navigation",
|
||||
},
|
||||
{
|
||||
ViewName: "submodules",
|
||||
Key: opts.GetKey(opts.Config.Universal.CopyToClipboard),
|
||||
Handler: self.handleCopySelectedSideContextItemToClipboard,
|
||||
Description: self.c.Tr.CopySubmoduleNameToClipboard,
|
||||
Tag: "misc",
|
||||
},
|
||||
{
|
||||
ViewName: "extras",
|
||||
Key: gocui.MouseWheelUp,
|
||||
Handler: self.scrollUpExtra,
|
||||
Tag: "navigation",
|
||||
},
|
||||
{
|
||||
ViewName: "extras",
|
||||
Key: gocui.MouseWheelDown,
|
||||
Handler: self.scrollDownExtra,
|
||||
Tag: "navigation",
|
||||
},
|
||||
{
|
||||
ViewName: "extras",
|
||||
Tag: "navigation",
|
||||
Key: opts.GetKey(opts.Config.Universal.PrevItemAlt),
|
||||
Modifier: gocui.ModNone,
|
||||
Handler: self.scrollUpExtra,
|
||||
Tag: "navigation",
|
||||
},
|
||||
{
|
||||
ViewName: "extras",
|
||||
Tag: "navigation",
|
||||
Key: opts.GetKey(opts.Config.Universal.PrevItem),
|
||||
Modifier: gocui.ModNone,
|
||||
Handler: self.scrollUpExtra,
|
||||
Tag: "navigation",
|
||||
},
|
||||
{
|
||||
ViewName: "extras",
|
||||
Tag: "navigation",
|
||||
Key: opts.GetKey(opts.Config.Universal.NextItem),
|
||||
Modifier: gocui.ModNone,
|
||||
Handler: self.scrollDownExtra,
|
||||
Tag: "navigation",
|
||||
},
|
||||
{
|
||||
ViewName: "extras",
|
||||
Tag: "navigation",
|
||||
Key: opts.GetKey(opts.Config.Universal.NextItemAlt),
|
||||
Modifier: gocui.ModNone,
|
||||
Handler: self.scrollDownExtra,
|
||||
Tag: "navigation",
|
||||
},
|
||||
{
|
||||
ViewName: "extras",
|
||||
Tag: "navigation",
|
||||
Key: gocui.MouseLeft,
|
||||
Modifier: gocui.ModNone,
|
||||
Handler: self.handleFocusCommandLog,
|
||||
Tag: "navigation",
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@ func (self *KeybindingCreator) call(customCommand config.CustomCommand, handler
|
||||
Modifier: gocui.ModNone,
|
||||
Handler: handler,
|
||||
Description: description,
|
||||
Tag: "customCommands",
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user