Open Talkabout opened 1 year ago
Which version of lazygit were you using before upgrading to 0.40.2? As far as I can see, it was never possible to map <c-h>
. I tried 0.37, and got the same error message.
The reason is probably that for a terminal, <c-h>
is indistinguishable from backspace.
Oh wait, I'm stupid, I tested wrong. It was indeed possible to map <c-h>
until v38.2.
Bisecting points at 2e66d87b949. I didn't investigate further whether or how it's possible to fix this.
Hi @stefanhaller, thanks for your investigation! I guess the fix is not that difficult, this key combination needs to be added to the "allowed" list. It was removed during the commit you linked, but my assumption is that it was removed because it was not contained by the other list of keys that was "synced" in the mentioned change.
No, it's not so simple. Adding <c-h>
to this list doesn't work, it complains that the entry is already in the list (under the name of <backspace>
, which is the same key).
But this shows us a workaround: in 0.38, mapping a command to <c-h>
or to <backspace>
achieved exactly the same thing. Mapping to <backspace>
still works in 0.40.2, so just do that and you'll be able to type ctrl-H to perform your command.
Untangling this better requires deeper investigation that I don't have time for right now...
Thank you @stefanhaller, the workaround works and I can live with it for now.
Describe the bug After update to version 0.40.2 I am not able to map
<c-h>
key.To Reproduce Steps to reproduce the behavior:
<c-h>
in config.yamlExpected behavior I'd like to be able to use this keybinding again
Screenshots![image](https://github.com/jesseduffield/lazygit/assets/10157917/570394f6-f346-48aa-8fc8-072dabf6e813)
Version info: commit=5e388e21c8ca6aa883dbcbe45c47f6fdd5116815, build date=2023-08-07T14:05:48Z, build source=binaryRelease, version=0.40.2, os=linux, arch=amd64, git version=2.39.2