New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't bind key ctrl-backspace (regression) #1975
Comments
Hi, This is intentional, but probably we're lacking some doc to explain how to do it. In fact WeeChat can not reliably distinguish backspace from ctrl-backspace: both keys have different raw code, but WeeChat can not know which one is backspace and which one is ctrl-backspace. Then one way to bind ctrl-backspace is to bind the raw key code, which could be ctrl-h (this one is ctrl-backspace for me):
Then try to press backspace and ctrl-backspace, you should have a different behavior. If not working, try:
If working fine, I'll update |
To add to that, the reason WeeChat can't know which of these keys is which is that in a terminal emulator, backspace and ctrl-backspace maps to the ctrl-h and ctrl-? keys. However, which maps to which depends on which terminal emulator you're using and the configuration of that terminal emulator. So when WeeChat receives ctrl-h or ctrl-? there's no way for it to know if it came from a backspace press or a ctrl-backspace press. For more details about this, see this discussion: https://comp.terminals.narkive.com/i3ywh6Rv/backspace-h-vs-linux-vs-terminfo To figure out what your terminal emulator sends, you can run Technically, in some terminal emulators it is possible to reliably distinguish between these keys by enabling an alternate keyboard protocol. However, this is not something WeeChat supports. |
I propose to add this text in
|
Binding |
Bug summary
Ctrl-Backspace seems to be impossible to use as a key binding. This is a regression as it was possible prior to version 4.0.
Steps to reproduce
1. Press
alt
+k
, followed byctrl
+backspace
.Current behavior
The output is:
backspace /input delete_previous_char
Expected behavior
The output is:
ctrl-backspace /input delete_previous_char
Suggested solutions
?
Additional information
Alternatively:
/key bind ctrl-backspace /input delete_previous_word
doesn't work either.The text was updated successfully, but these errors were encountered: