jesseduffield / jesseduffield/lazygit
Deprecated "-alt" keybindings are still defined internally and may conflict with actual user-defined keybinds.
- Dominant language
- Go
- Stars
- 82.4k
- Forks
- 3k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 19
Description
### Describe the bug
Because the (now deprecated) "-alt" keybindings (e.g. `prevItem-alt` are still defined internally _and have a default key set_, it's possible that a keybinding the user explicitly sets is instead invisibly overwritten.
### To Reproduce
Steps to reproduce the behavior:
1. Set the following minimal "config.yml":
```yaml
keybinding:
universal:
prevItem: i
nextItem: k
```
2. `lazygit`
3. Activate the "commits" pane.
4. Press 'k'.
5. "Nothing" happens.
What's really happening here is you're triggering the hidden "prevItem-alt" keybinding, which defaults to 'k' and overrides your "nextItem" setting. (You can see this if you click on a commit down the list and _then_ press 'k', which moves your cursor **up** a line instead of down.)
Per [the current docs](https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md) (on both the "master" branch and the "v0.63.0" tag), the above config is how you set the "prevItem" and "nextItem" keybinds, but the (now undocumented but still active) "-alt" keybinds are working against you.
My suggestion would be to either:
- fully remove (rather than just deprecating) the old "-alt" keybinds, or ...
- deprioritize (I'm guessing this comes down to what order the config is processed in?) the "-alt" keybinds so that user-set bindings always override them
### Version info:
* `commit=ce5a8b61bdc9439f2137a1ce9c6a5981c412a0ad, build date=2026-07-04T12:45:51Z, build source=binaryRelease, version=0.63.0, os=linux, arch=amd64, git version=2.53.0`
### Terminal info:
I'm seeing this on a TTY login. No GUI = no terminal emulator.
### Additional context
I've verified this is still an issue even if you define the "prevItem" and "nextItem" as arrays, FWTW:
```yaml
keybinding:
universal:
prevItem: [i]
nextItem: [k]
```
Contributor guide
Research direction
Start by reproducing the conflict with the minimal config.yml from the issue, then review docs/Config.md and the keybinding configuration handling. Done means an explicitly configured nextItem binding such as k is honored instead of being intercepted by the deprecated prevItem-alt binding; add or update coverage for that behavior if the relevant test location is found.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100