summaryrefslogtreecommitdiffstats
path: root/pkg/gui/keybindings.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2020-08-20 09:00:55 +1000
committerJesse Duffield <jessedduffield@gmail.com>2020-08-23 14:29:18 +1000
commit433d54fcec8bd8ec7f978ec30574d2e1273b7817 (patch)
tree41011816b4b801381ced3bdff64c2291c980bf98 /pkg/gui/keybindings.go
parent146722beb875d6f44a9d05b289e1cf92e8518932 (diff)
WIP constants for context keys
Diffstat (limited to 'pkg/gui/keybindings.go')
-rw-r--r--pkg/gui/keybindings.go92
1 files changed, 46 insertions, 46 deletions
diff --git a/pkg/gui/keybindings.go b/pkg/gui/keybindings.go
index fbdfd78f8..264e2f495 100644
--- a/pkg/gui/keybindings.go
+++ b/pkg/gui/keybindings.go
@@ -466,91 +466,91 @@ func (gui *Gui) GetInitialKeybindings() []*Binding {
},
{
ViewName: "branches",
- Contexts: []string{"local-branches"},
+ Contexts: []string{"localBranches"},
Key: gui.getKey("universal.select"),
Handler: gui.handleBranchPress,
Description: gui.Tr.SLocalize("checkout"),
},
{
ViewName: "branches",
- Contexts: []string{"local-branches"},
+ Contexts: []string{"localBranches"},
Key: gui.getKey("branches.createPullRequest"),
Handler: gui.handleCreatePullRequestPress,
Description: gui.Tr.SLocalize("createPullRequest"),
},
{
ViewName: "branches",
- Contexts: []string{"local-branches"},
+ Contexts: []string{"localBranches"},
Key: gui.getKey("branches.checkoutBranchByName"),
Handler: gui.handleCheckoutByName,
Description: gui.Tr.SLocalize("checkoutByName"),
},
{
ViewName: "branches",
- Contexts: []string{"local-branches"},
+ Contexts: []string{"localBranches"},
Key: gui.getKey("branches.forceCheckoutBranch"),
Handler: gui.handleForceCheckout,
Description: gui.Tr.SLocalize("forceCheckout"),
},
{
ViewName: "branches",
- Contexts: []string{"local-branches"},
+ Contexts: []string{"localBranches"},
Key: gui.getKey("universal.new"),
Handler: gui.handleNewBranch,
Description: gui.Tr.SLocalize("newBranch"),
},
{
ViewName: "branches",
- Contexts: []string{"local-branches"},
+ Contexts: []string{"localBranches"},
Key: gui.getKey("universal.remove"),
Handler: gui.handleDeleteBranch,
Description: gui.Tr.SLocalize("deleteBranch"),
},
{
ViewName: "branches",
- Contexts: []string{"local-branches"},
+ Contexts: []string{"localBranches"},
Key: gui.getKey("branches.rebaseBranch"),
Handler: gui.handleRebaseOntoLocalBranch,
Description: gui.Tr.SLocalize("rebaseBranch"),
},
{
ViewName: "branches",
- Contexts: []string{"local-branches"},
+ Contexts: []string{"localBranches"},
Key: gui.getKey("branches.mergeIntoCurrentBranch"),
Handler: gui.handleMerge,
Description: gui.Tr.SLocalize("mergeIntoCurrentBranch"),
},
{
ViewName: "branches",
- Contexts: []string{"local-branches"},
+ Contexts: []string{"localBranches"},
Key: gui.getKey("branches.viewGitFlowOptions"),
Handler: gui.handleCreateGitFlowMenu,
Description: gui.Tr.SLocalize("gitFlowOptions"),
},
{
ViewName: "branches",
- Contexts: []string{"local-branches"},
+ Contexts: []string{"localBranches"},
Key: gui.getKey("branches.FastForward"),
Handler: gui.handleFastForward,
Description: gui.Tr.SLocalize("FastForward"),
},
{
ViewName: "branches",
- Contexts: []string{"local-branches"},
+ Contexts: []string{"localBranches"},
Key: gui.getKey("commits.viewResetOptions"),
Handler: gui.handleCreateResetToBranchMenu,
Description: gui.Tr.SLocalize("viewResetOptions"),
},
{
ViewName: "branches",
- Contexts: []string{"local-branches"},
+ Contexts: []string{"localBranches"},
Key: gui.getKey("branches.renameBranch"),
Handler: gui.handleRenameBranch,
Description: gui.Tr.SLocalize("renameBranch"),
},
{
ViewName: "branches",
- Contexts: []string{"local-branches"},
+ Contexts: []string{"localBranches"},
Key: gui.getKey("universal.copyToClipboard"),
Handler: gui.handleClipboardCopyBranch,
Description: gui.Tr.SLocalize("copyBranchNameToClipboard"),
@@ -604,14 +604,14 @@ func (gui *Gui) GetInitialKeybindings() []*Binding {
},
{
ViewName: "branches",
- Contexts: []string{"remote-branches"},
+ Contexts: []string{"remoteBranches"},
Key: gui.getKey("universal.return"),
Handler: gui.handleRemoteBranchesEscape,
Description: gui.Tr.SLocalize("ReturnToRemotesList"),
},
{
ViewName: "branches",
- Contexts: []string{"remote-branches"},
+ Contexts: []string{"remoteBranches"},
Key: gui.getKey("commits.viewResetOptions"),
Handler: gui.handleCreateResetToRemoteBranchMenu,
Description: gui.Tr.SLocalize("viewResetOptions"),
@@ -637,147 +637,147 @@ func (gui *Gui) GetInitialKeybindings() []*Binding {
},
{
ViewName: "commits",
- Contexts: []string{"branch-commits"},
+ Contexts: []string{"branchCommits"},
Key: gui.getKey("commits.squashDown"),
Handler: gui.handleCommitSquashDown,
Description: gui.Tr.SLocalize("squashDown"),
},
{
ViewName: "commits",
- Contexts: []string{"branch-commits"},
+ Contexts: []string{"branchCommits"},
Key: gui.getKey("commits.renameCommit"),
Handler: gui.handleRenameCommit,
Description: gui.Tr.SLocalize("renameCommit"),
},
{
ViewName: "commits",
- Contexts: []string{"branch-commits"},
+ Contexts: []string{"branchCommits"},
Key: gui.getKey("commits.renameCommitWithEditor"),
Handler: gui.handleRenameCommitEditor,
Description: gui.Tr.SLocalize("renameCommitEditor"),
},
{
ViewName: "commits",
- Contexts: []string{"branch-commits"},
+ Contexts: []string{"branchCommits"},
Key: gui.getKey("commits.viewResetOptions"),
Handler: gui.handleCreateCommitResetMenu,
Description: gui.Tr.SLocalize("resetToThisCommit"),
},
{
ViewName: "commits",
- Contexts: []string{"branch-commits"},
+ Contexts: []string{"branchCommits"},
Key: gui.getKey("commits.markCommitAsFixup"),
Handler: gui.handleCommitFixup,
Description: gui.Tr.SLocalize("fixupCommit"),
},
{
ViewName: "commits",
- Contexts: []string{"branch-commits"},
+ Contexts: []string{"branchCommits"},
Key: gui.getKey("commits.createFixupCommit"),
Handler: gui.handleCreateFixupCommit,
Description: gui.Tr.SLocalize("createFixupCommit"),
},
{
ViewName: "commits",
- Contexts: []string{"branch-commits"},
+ Contexts: []string{"branchCommits"},
Key: gui.getKey("commits.squashAboveCommits"),
Handler: gui.handleSquashAllAboveFixupCommits,
Description: gui.Tr.SLocalize("squashAboveCommits"),
},
{
ViewName: "commits",
- Contexts: []string{"branch-commits"},
+ Contexts: []string{"branchCommits"},
Key: gui.getKey("universal.remove"),
Handler: gui.handleCommitDelete,
Description: gui.Tr.SLocalize("deleteCommit"),
},
{
ViewName: "commits",
- Contexts: []string{"branch-commits"},
+ Contexts: []string{"branchCommits"},
Key: gui.getKey("commits.moveDownCommit"),
Handler: gui.handleCommitMoveDown,
Description: gui.Tr.SLocalize("moveDownCommit"),
},
{
ViewName: "commits",
- Contexts: []string{"branch-commits"},
+ Contexts: []string{"branchCommits"},
Key: gui.getKey("commits.moveUpCommit"),
Handler: gui.handleCommitMoveUp,
Description: gui.Tr.SLocalize("moveUpCommit"),
},
{
ViewName: "commits",
- Contexts: []string{"branch-commits"},
+ Contexts: []string{"branchCommits"},
Key: gui.getKey("universal.edit"),
Handler: gui.handleCommitEdit,
Description: gui.Tr.SLocalize("editCommit"),
},
{
ViewName: "commits",
- Contexts: []string{"branch-commits"},
+ Contexts: []string{"branchCommits"},
Key: gui.getKey("commits.amendToCommit"),
Handler: gui.handleCommitAmendTo,
Description: gui.Tr.SLocalize("amendToCommit"),
},
{
ViewName: "commits",
- Contexts: []string{"branch-commits"},
+ Contexts: []string{"branchCommits"},
Key: gui.getKey("commits.pickCommit"),
Handler: gui.handleCommitPick,
Description: gui.Tr.SLocalize("pickCommit"),
},
{
ViewName: "commits",
- Contexts: []string{"branch-commits"},
+ Contexts: []string{"branchCommits"},
Key: gui.getKey("commits.revertCommit"),
Handler: gui.handleCommitRevert,
Description: gui.Tr.SLocalize("revertCommit"),
},
{
ViewName: "commits",
- Contexts: []string{"branch-commits"},
+ Contexts: []string{"branchCommits"},
Key: gui.getKey("commits.cherryPickCopy"),
Handler: gui.handleCopyCommit,
Description: gui.Tr.SLocalize("cherryPickCopy"),
},
{
ViewName: "commits",
- Contexts: []string{"branch-commits"},
+ Contexts: []string{"branchCommits"},
Key: gui.getKey("universal.copyToClipboard"),
Handler: gui.handleClipboardCopyCommit,
Description: gui.Tr.SLocalize("copyCommitShaToClipboard"),
},
{
ViewName: "commits",
- Contexts: []string{"branch-commits"},
+ Contexts: []string{"branchCommits"},
Key: gui.getKey("commits.cherryPickCopyRange"),
Handler: gui.handleCopyCommitRange,
Description: gui.Tr.SLocalize("cherryPickCopyRange"),
},
{
ViewName: "commits",
- Contexts: []string{"branch-commits"},
+ Contexts: []string{"branchCommits"},
Key: gui.getKey("commits.pasteCommits"),
Handler: gui.HandlePasteCommits,
Description: gui.Tr.SLocalize("pasteCommits"),
},
{
ViewName: "commits",
- Contexts: []string{"branch-commits"},
+ Contexts: []string{"branchCommits"},
Key: gui.getKey("universal.goInto"),
Handler: gui.wrappedHandler(gui.handleSwitchToCommitFilesPanel),
Description: gui.Tr.SLocalize("viewCommitFiles"),
},
{
ViewName: "commits",
- Contexts: []string{"branch-commits"},
+ Contexts: []string{"branchCommits"},
Key: gui.getKey("commits.checkoutCommit"),
Handler: gui.handleCheckoutCommit,
Description: gui.Tr.SLocalize("checkoutCommit"),
},
{
ViewName: "commits",
- Contexts: []string{"branch-commits"},
+ Contexts: []string{"branchCommits"},
Key: gui.getKey("universal.new"),
Modifier: gocui.ModNone,
Handler: gui.wrappedHandler(gui.handleNewBranchOffCommit),
@@ -785,28 +785,28 @@ func (gui *Gui) GetInitialKeybindings() []*Binding {
},
{
ViewName: "commits",
- Contexts: []string{"branch-commits"},
+ Contexts: []string{"branchCommits"},
Key: gui.getKey("commits.tagCommit"),
Handler: gui.handleTagCommit,
Description: gui.Tr.SLocalize("tagCommit"),
},
{
ViewName: "commits",
- Contexts: []string{"branch-commits"},
+ Contexts: []string{"branchCommits"},
Key: gui.getKey("commits.resetCherryPick"),
Handler: gui.handleResetCherryPick,
Description: gui.Tr.SLocalize("resetCherryPick"),
},
{
ViewName: "commits",
- Contexts: []string{"reflog-commits"},
+ Contexts: []string{"reflogCommits"},
Key: gui.getKey("universal.select"),
Handler: gui.handleCheckoutReflogCommit,
Description: gui.Tr.SLocalize("checkoutCommit"),
},
{
ViewName: "commits",
- Contexts: []string{"reflog-commits"},
+ Contexts: []string{"reflogCommits"},
Key: gui.getKey("commits.viewResetOptions"),
Handler: gui.handleCreateReflogResetMenu,
Description: gui.Tr.SLocalize("viewResetOptions"),
@@ -1300,14 +1300,14 @@ func (gui *Gui) GetInitialKeybindings() []*Binding {
},
{
ViewName: "branches",
- Contexts: []string{"remote-branches"},
+ Contexts: []string{"remoteBranches"},
Key: gui.getKey("universal.select"),
Handler: gui.handleCheckoutRemoteBranch,
Description: gui.Tr.SLocalize("checkout"),
},
{
ViewName: "branches",
- Contexts: []string{"remote-branches"},
+ Contexts: []string{"remoteBranches"},
Key: gui.getKey("universal.new"),
Handler: gui.handleNewBranchOffRemote,
Description: gui.Tr.SLocalize("newBranch"),
@@ -1315,28 +1315,28 @@ func (gui *Gui) GetInitialKeybindings() []*Binding {
{
ViewName: "branches",
- Contexts: []string{"remote-branches"},
+ Contexts: []string{"remoteBranches"},
Key: gui.getKey("branches.mergeIntoCurrentBranch"),
Handler: gui.handleMergeRemoteBranch,
Description: gui.Tr.SLocalize("mergeIntoCurrentBranch"),
},
{
ViewName: "branches",
- Contexts: []string{"remote-branches"},
+ Contexts: []string{"remoteBranches"},
Key: gui.getKey("universal.remove"),
Handler: gui.handleDeleteRemoteBranch,
Description: gui.Tr.SLocalize("deleteBranch"),
},
{
ViewName: "branches",
- Contexts: []string{"remote-branches"},
+ Contexts: []string{"remoteBranches"},
Key: gui.getKey("branches.rebaseBranch"),
Handler: gui.handleRebaseOntoRemoteBranch,
Description: gui.Tr.SLocalize("rebaseBranch"),
},
{
ViewName: "branches",
- Contexts: []string{"remote-branches"},
+ Contexts: []string{"remoteBranches"},
Key: gui.getKey("branches.setUpstream"),
Handler: gui.handleSetBranchUpstream,
Description: gui.Tr.SLocalize("setUpstream"),