Bug 152759

Summary: alt+backspace doesn't delete previous word
Product: [Applications] konsole Reporter: Will Stephenson <wstephenson>
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: patch to fix alt-backspace behavior

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