Bug 152759 - alt+backspace doesn't delete previous word
Summary: alt+backspace doesn't delete previous word
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-23 09:26 UTC by Will Stephenson
Modified: 2007-12-16 06:44 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
patch to fix alt-backspace behavior (921 bytes, patch)
2007-12-15 20:58 UTC, Luca Gugelmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Will Stephenson 2007-11-23 09:26:23 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
OS:                Linux

I'm not sure if I'm making this bug report in the right place...

The mapping of alt+backspace to 'delete word' (ctrl-w?) has vanished from Konsole in KDE 4.  

I would compare keytabs but there is no 'default.keytab' in KDE 3.
Comment 1 Robert Knight 2007-12-11 05:21:13 UTC
This might be related to a lack of support for wildcards in the .keytab files before the recent SVN revision #743477.

Can you test with a more recent build and confirm if this problem still exists? (I don't have access to a working KDE 4 setup for the next few days)
Comment 2 Luca Gugelmann 2007-12-15 20:58:18 UTC
Created attachment 22569 [details]
patch to fix alt-backspace behavior
Comment 3 Luca Gugelmann 2007-12-15 20:58:46 UTC
This is an easy fix: in all .keytab files the backspace key is mapped to "\x7f" (backspace) without regard to the status of the modifier keys, the "alt" just gets eaten away and the shell never sees it.

The proposed patch changes this to emit a "\x7f" only when no alt key is pressed and fixes the bug.

The patch only changes default.keytab and linux.keytab, since I don't know how the other layouts are supposed to behave in this situation.
Comment 4 Robert Knight 2007-12-16 06:44:04 UTC
Fixed in SVN revision #748991.  The .keytab file was correct, but there was a bug in the code which converted Alt+Key key events into Esc+Key character sequences to send to the terminal.

"Fix Alt+Backspace, it now deletes the previous word as expected.  Fix test for converting Alt+[Char] into Esc+[Char] when sending text to terminal.  The conversion is only avoided when the key translator entry which matched requires the alt modifier or any modifier.  Previously the Alt+Char -> Esc+Char was avoided if any entry matched, as in the Backspace case."