Skip to content
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

Textarea, what is ctrl+w should be ctrl+backspace, but that wont work, why? #5134

Open
BurnoutDV opened this issue Oct 16, 2024 · 4 comments

Comments

@BurnoutDV
Copy link

So I had small look around and found
#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!

Copy link

We found the following entry in the FAQ which you may find helpful:

Feel free to close this issue if you found an answer in the FAQ. Otherwise, please give us a little time to review.

This is an automated reply, generated by FAQtory

@willmcgugan
Copy link
Collaborator

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?

@BurnoutDV
Copy link
Author

Ah i see, Konsole (the KDE default one) is indeed unable to and registers it as just backspace. Thanks for your time.

@darrenburns
Copy link
Member

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants