Skip to content

Custom Keybindings

dash allows you to override existing keybindings as well as add custom ones.

Every valid entry for the configuration options must have a key and command. When a user presses the key or key combination the dashboard shells out and executes the command.

To help you identify your custom commands, an additional name property can be supplied to describe it in the help menu.

There are 3 types of keybindings: universal, prs and issues.

Define keybindings that will work in any view.

For example:

keybindings:
universal:
- key: g
name: lazygit
command: >
cd {{.RepoPath}} && lazygit
- key: s
builtin: search

The following built-in universal commands can be overridden with custom keybinds:

CommandDescription
uprow up
downrow down
firstLinego to first row
lastLinego to last row
togglePreviewtoggle the preview pane
openGithubopen the selection in GitHub
refreshrefresh the current section
refreshAllrefresh all sections
redrawredraw the screen - in case of visual artifacts
pageDowngo one page down in the preview pane
pageUpgo one page up in the preview pane
nextSectiongo to next section
prevSectiongo to previous section
searchfocus the search bar
copyurlcopy the URL of the selected row
copyNumbercopy the number of the selected row
helptoggle the help menu
quitquit gh-dash

See global keys and navigation keys for more details.

Define any number of keybindings for the PRs view or override existing ones.

For example:

keybindings:
prs:
- key: O
builtin: checkout
- key: m
command: gh pr merge --admin --repo {{.RepoName}} {{.PrNumber}}
- key: g
name: lazygit add
command: >
cd {{.RepoPath}} && git add -A && lazygit
- key: v
name: approve
command: >
gh pr review --repo {{.RepoName}} --approve --body "$(gum input --prompt='Approval Comment: ')" {{.PrNumber}}
ArgumentDescription
RepoNameThe full name of the repo (e.g. dlvhdr/gh-dash)
RepoPathThe path to the Repo, using the config.yml repoPaths key to get the mapping
PrNumberThe PR number
HeadRefNameThe PR’s head branch name
BaseRefNameThe PR’s base branch name
AuthorThe username of the PR author

The following built-in PR commands can be overridden with custom keybinds:

CommandDescription
prevSidebarTabprevious sidebar tab
nextSidebarTabnext sidebar tab
approveapprove the PR
assignassign users to the PR
unassignunassign users from the PR
commentadd a comment to the PR
diffshow the diff of the PR
checkoutlocally checkout the PR
closeclose the PR
readymark the PR as ready
reopenreopen a closed PR
mergemerge the PR
updateupdate the PR to the latest base branch
watchCheckswatch the checks of the PR and get notified
approveWorkflowsapprove the runs of the PR
viewIssuesswitch to the Issues view
summaryViewMoreexpand the truncated PR description

See PR keys for more details.

Define any number of keybindings for the issues view or override existing ones.

For example:

keybindings:
issues:
key: "P"
command: >
gh issue pin {{ .IssueNumber }} --repo {{ .RepoName }}
ArgumentDescription
RepoNameThe full name of the repo (e.g. dlvhdr/gh-dash)
RepoPathThe path to the Repo, using the config.yml repoPaths key to get the mapping
IssueNumberThe issue number
AuthorThe username of the issue author

The following built-in PR commands can be overridden with custom keybinds:

CommandDescription
labeledit the issue’s labels
assignassign users to the issue
unassignremove assigned users from the issue
commentadd a comment to the issue
closeclose the issue
reopenreopen a closed issue
viewPrsswitch to the PRs view

See issue keys for more details.

Define any number of keybindings for the notifications view or override existing ones.

For example:

keybindings:
notifications:
- key: d
builtin: markAsDone
- key: D
builtin: markAllAsDone

The command template receives different fields depending on whether the sidebar has been opened:

StatePR template fields
Sidebar not openRepoName, PrNumber, RepoPath
Sidebar open+ HeadRefName, BaseRefName, Author
StateIssue template fields
Sidebar not openRepoName, IssueNumber, RepoPath
Sidebar open+ Author

If a template references a sidebar-only field (e.g., {{.HeadRefName}}) before the sidebar is opened, the template engine’s missingkey=error option produces an error message. This is intentional — users should open the notification first to populate the full data.

The following built-in notifications commands can be overridden with custom keybinds:

CommandDescription
viewview notification (fetches content, marks as read)
markAsDonemark as done (removes from inbox)
markAllAsDonemark all as done
markAsReadmark as read
markAllAsReadmark all as read
unsubscribeunsubscribe from thread
toggleBookmarktoggle bookmark

See notification keys for more details.