To map shortcuts like Ctrl+Bksp/Del to delete words backwards and forwards in Konsole:
- Go to Settings > Edit Current Profile... > Keyboard > Edit...`
- Edit (or add) the following key combos if they don't already exist:
| Key Combination | Output | (Explanation) |
|---|---|---|
| Backspace-Ctrl | \x7f | Backspace without Ctrl should just delete the character before the cursor |
| Backspace+Ctrl | \E\b | Backspace with Ctrl should delete the word before the cursor. ^H should be encoded as \x08 (ascii control character code in hex) but Konsole converts that to \b, it's code for backspace. |
| Del | \E[3~ | Self-explanatory |
| Del+AnyModifier | \E[3;*~ | Came with Konsole, we don't touch it |
| Del+Ctrl | \Ed | Escape is \E in console, and Escape+D in bash deletes the word after the cursor |
Save and exit. 🎉 now your delete word keyboard shortcuts work.
Thank you! Crazy that I had to go-through 10 search-results before finding this!