Bug 431203 - Alt+D does not delete the word in front of the cursor.
Summary: Alt+D does not delete the word in front of the cursor.
Status: RESOLVED DOWNSTREAM
Alias: None
Product: plasmashell
Classification: Plasma
Component: general (show other bugs)
Version: 5.14.5
Platform: Debian stable Linux
: NOR normal
Target Milestone: 1.0
Assignee: David Edmundson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-06 00:44 UTC by Kete
Modified: 2021-03-20 15:13 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
text output of xev with default keymap pressing alt d and alt f4 (6.92 KB, text/plain)
2021-01-09 17:38 UTC, Kete
Details
text output of xev with Colemak keymap pressing alt d and alt f4 (6.90 KB, text/plain)
2021-01-09 17:39 UTC, Kete
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kete 2021-01-06 00:44:54 UTC
SUMMARY
One Bash shortcut I like and would use often in Konsole is Alt+D to delete the group of alphanumeric characters in front of the cursor. This shortcut does not work in Konsole. I have to work around by deleting one character at a time or hopping ahead and using Ctrl+W or Alt+Backspace to delete backwards.


STEPS TO REPRODUCE
1. Put cursor before text that you want to delete.
2. Press Alt and d.

OBSERVED RESULT
Nothing happens.

EXPECTED RESULT
Alphanumeric characters were supposed to be cut to Bash's clipboard.

SOFTWARE/OS VERSIONS
Linux: 4.19.0-13-amd64
KDE Plasma Version: 5.14.5
KDE Frameworks Version: 5.54.0
Qt Version: 5.11.3

ADDITIONAL INFORMATION
Thank you for your hacking or whatever you like to call programming.
Comment 1 Ahmad Samir 2021-01-06 18:02:59 UTC
Alt+D works here to delete the word in front of the cursor; what's the output of:
bind -p | grep kill-word

I get (among other results):
"\ed": kill-word
Comment 2 Kete 2021-01-07 00:17:03 UTC
Oh wow, that's weird. Thanks for checking! The output of 'bind -p | grep kill-word' is the following:
"\e\C-h": backward-kill-word
"\e\C-?": backward-kill-word
"\e[3;5~": kill-word
"\ed": kill-word
# shell-backward-kill-word (not bound)
# shell-kill-word (not bound)


Btw, Alt+F and Alt+B navigate ahead and backwards by one word as expected. I'm using the Colemak keymap.
Comment 3 Ahmad Samir 2021-01-07 00:30:04 UTC
So the shortcut is defined in bash/readline ("\ed" is Alt+d); could you try this:
press Ctrl+v, after that press Alt+d (that is press Ctrl+v, let go of the buttons, then press Alt+d), ideally you would get this:
^[d

if not, check if Alt+d is set as a shortcut for something in Konsole -> settings -> configure keyboard shortcut (you can filter the shortcuts by searching for "alt+d" in the search box at the top of the dialog).
Comment 4 Kete 2021-01-07 22:04:32 UTC
Hmm, I'm not getting any output, and I didn't see Alt+D in Konsole's shortcut settings or any of the other system shortcut settings. One thing I noticed was that Alt+D doesn't seem to send input after I press Ctrl+V. For example, if I press Alt+Backspace instead, then I can press Ctrl+V again to try another shortcut, but if I try Alt+D and then Ctrl+V again, then it outputs ^V as if Alt+D didn't send a signal but the second Ctrl+V sent a Ctrl+V to the first. Alt+Backspace doesn't output anything, but Alt+B outputs ^[b. And Alt+F outputs ^[f. Also, when I start typing with the mouse pointer over the shell, the mouse pointer, now the I bar for selecting text, disappears and only reappears if I press Alt+D or move the mouse, but other two other Alt combinations—Alt+G and Alt+R—will do this as well. When I Ctrl+V, Alt+G, and then Ctrl+V again, I get ^V. Same for Alt+R.

Would it help to make a new user and see what its terminal does? I don't see the option for a guest account.
Comment 5 Ahmad Samir 2021-01-07 22:28:11 UTC
Try creating a new konsole profile (settings -> configure konsole -> profiles).

FWIW, I get the same behaviour with Alt+Backspace, but not with Alt+R or Alt+G.
Comment 6 Ahmad Samir 2021-01-08 16:45:53 UTC
On second thought, creating a new profile won't work, because it'll create a new profile based on the old one (or the selected one in the manage profile dialog). An alternative is to use 'File -> New tab -> Default' or 'Settings-> switch profile -> Default'.
Comment 7 Kete 2021-01-08 22:56:27 UTC
(In reply to Ahmad Samir from comment #6)

I switched my system keymap back to default, and Alt+D worked fine. Ctrl+V and Alt+D produced the expected output, so something about Colemak on this computer interrupts Alt+D in the terminal. I don't have this problem on another distro. (Trisquel which is based on Ubuntu and uses the Mate environment) What can I do? I don't know if this is caused by KDE or Debian.
Comment 8 Ahmad Samir 2021-01-09 10:42:43 UTC
A shot in the dark, compare the terminal output while using `xev`, with both keymaps?
Comment 9 Kete 2021-01-09 17:38:37 UTC
Created attachment 134687 [details]
text output of xev with default keymap pressing alt d and alt f4
Comment 10 Kete 2021-01-09 17:39:10 UTC
Created attachment 134688 [details]
text output of xev with Colemak keymap pressing alt d and alt f4
Comment 11 Kete 2021-01-09 17:46:27 UTC
(In reply to Ahmad Samir from comment #8)
> A shot in the dark, compare the terminal output while using `xev`, with both
> keymaps?

Ok, I uploaded the output. The Colemak keymap seemed to have an extra keypress reported.

I just noticed this problem happened in Thunderbird, too, when I tried to discard a draft with Alt+D. Alt+S would save the draft, so I think we can close this bug report. But I need to figure out whether KDE or Debian needs to know their Colemak isn't sending an Alt+D and maybe an Alt+R and a Alt+G. I guess I could proceed with submitting a bug report for Colemak to each, later. I have a feeling this is more Debian's fault than KDE, but these keys are working in Trisquel Mate, which is an Ubuntu derivative.
Comment 12 Bug Janitor Service 2021-01-24 04:33:15 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 13 Kete 2021-01-24 14:51:10 UTC
Hello, I have a Debian LXQt computer where I could test the Colemak Alt+D in a terminal (QTerminal), and the shortcut worked as expected. I installed QTerminal in this KDE environment, but the Alt+D shortcut didn't work. Therefore, I don't think the Colemak problem is with Debian, and I think it's something caused by KDE. So I'm assigning this bug to kxkb.
Comment 14 Nate Graham 2021-03-20 03:10:50 UTC
Do you have multiple keyboard layouts? If so, this is probably Bug 402913.

Also please try to upgrade; Plasma 5.14 is over two years old and is no longer receiving bugfixes.
Comment 15 Kete 2021-03-20 15:13:36 UTC
I was going to ask Debian for help with this.