#7674 closed enhancement (fixed)
Add backward-kill-word to BTextView
Reported by: | GeneralMaximus | Owned by: | nobody |
---|---|---|---|
Priority: | normal | Milestone: | R1/beta2 |
Component: | Kits/Interface Kit | Version: | |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
A backward-kill-word shortcut in BTextView would be a welcome addition. The current method of killing the previous word by holding Shift, then pressing Ctrl+Left to select the word, and finally pressing Backspace is cumbersome.
Since Ctrl+Backspace is already mapped to Delete, the attached patch makes Option+Backspace kill the previous word. But there's a consistency issue here: moving between words is done using Ctrl+Left and Ctrl+Right so, logically, Ctrl+Backspace should kill the previous word. Instead, I've attached an additional patch that changes Ctrl+Left and Ctrl+Right to Option+Left and Option+Right. Now all text movement shortcuts are accessed through the Option key. I was not sure if this was a good idea, so I made a separate patch.
Description of patches:
- backward-kill-word.diff: makes Option+Backspace kill the previous word.
- backward-kill-word-and-backward-word.diff: makes Option+Backspace kill the previous word. Additionally, Option+Left Arrow and Option+Right Arrow are used to move back or forward by words. This is a change from the previous way of moving between words, which was Ctrl+Left Arrow and Ctrl+Right Arrow.
Attachments (2)
Change History (13)
by , 13 years ago
Attachment: | backward-kill-word.diff added |
---|
comment:1 by , 13 years ago
patch: | 0 → 1 |
---|
by , 13 years ago
Attachment: | backward-kill-word-and-backward-word.diff added |
---|
comment:2 by , 13 years ago
comment:3 by , 13 years ago
The poor Apple users don't have a delete key, so I guess the shortcut is for them. But I would agree that this should be changed - on a Mac, it's even "Fn-Backspace", and that might even work on Haiku as well (haven't checked, though).
comment:4 by , 13 years ago
I'd rather have Option+Backspace instead of Ctrl+Backspace. Here's why: AFAIK, currently you can't send Meta to the Haiku terminal. If we set Option as the Meta key in Terminal, we can use all the awesome readline shortcuts mapped to Meta (see: http://www.bigsmoke.us/readline/shortcuts). We can then add some of the same readline shortcuts to BTextView and get limited readline-style editing in all GUI apps. If you spend a lot of time in readline-powered tools, this saves you a context switch when you Ctrl+Tab to Vision or WebPositive. Mac OS X already does this with all Cocoa text controls.
Since this is something I'd really like to see, I'm willing to send in more patches. Only if this is desirable, of course.
That said, the Ctrl+Bkspc => Del mapping in the US keymap is not very useful. Most US keyboards have the Del key either physically, or at least through the Fn key.
comment:5 by , 13 years ago
The option key is actually not available on all keyboards, and for being consistent, the control-delete/backspace mapping makes the most sense to me.
I see no meta in the shortcuts you linked to, and at least the control ones already work fine. IIRC some of them will also work in BTextView.
comment:6 by , 13 years ago
I see no meta in the shortcuts you linked to, and at least the control ones already work fine. IIRC some of them will also work in BTextView.
Call me a pedant, but all occurences of "Alt" in that list should be changed to "Meta". Since we're using Alt as Command in the default layout, Option is the next best choice.
comment:7 by , 13 years ago
comment:8 by , 13 years ago
patch: | 1 → 0 |
---|
comment:9 by , 8 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:10 by , 5 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
This was implemented with hrev53255.
comment:11 by , 5 years ago
Milestone: | R1 → R1/beta2 |
---|
Assign tickets with status=closed and resolution=fixed within the R1/beta2 development window to the R1/beta2 Milestone
Is there a reason to have CTRL+BACKSPACE simulating DELETE? I mean, there's a whole separate key dedicated to this action... I'd much rather have CTRL+BACKSPACE do the killing (+ CTRL+DELETE doing the forward kill).
The German keymap doesn't have the CTRL+BACKSPACE == DELETE by the way.