Open BurnoutDV opened 1 month ago
Not all terminals can detect such key combinations. terminal.app on macOS for instance, can't detect ctrl+backspace. Newer terminals (most of them at this point) support an updated key protocol, and can detect ctrl+backspace
.
If you run the following command, you will be able to see exactly what your terminal is producing:
textual keys
I suspect we went with ctrl+w
because it is universally supported. But we could bind both key combos. @darrenburns what do you think?
Ah i see, Konsole (the KDE default one) is indeed unable to and registers it as just backspace. Thanks for your time.
We could register ctrl+backspace
for those terminals that do support it, but even then it's not standard (MacOS uses option+backspace for the same purpose).
So I had small look around and found https://github.com/Textualize/textual/issues/3440 I skimmed it and i am not entirely sure if its totally relevant, but it probably is. To my problem:
When you use a word processor, editor or any input under Linux or Windows, generally ctrl+backspace works as delete_word_left which is actually a function bound to ctrl+w for text area widgets. I was about to make a pull request for this obvious oversight but you guys already had implemented the function. So I thought its a me problem and I just create "TextArea2" for personal use, but it seems, ctrl+backspace is in general not a key binding that is going to work. I assume the problem is deeper.
Since I learned about ctrl+backspace its the most used feature in any text editor, just so handy to delete the entire word and rewritting instead of backspacing. I know this is a console emulator and I only tested Konsole and xterm, and yet, I would really love to have the familiar keybinding instead of the rather unintuitive ctrl+w.
I am mostly looking for info as a quick delve dredged nothing up. Thanks for the awesome work!