Bug 37405 - backspace key code should be changed at runtime to match stty erase
Summary: backspace key code should be changed at runtime to match stty erase
Status: RESOLVED REMIND
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources All
: NOR wishlist
Target Milestone: ---
Assignee: Robert Knight
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-01-22 16:18 UTC by Ričardas Čepas
Modified: 2008-07-13 02:55 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Patch to get the erase character from the terminal, rather than setting the terminal erase char to match the entry for the Backspace key in the .keytab file (3.65 KB, patch)
2007-12-19 04:04 UTC, Robert Knight
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ričardas Čepas 2002-01-22 16:10:19 UTC
(*** This bug was imported into bugs.kde.org ***)

Package:           konsole
Version:           1.1 Beta (using KDE 2.9.0 2 (CVS >= 20020104))
Severity:          normal
Installed from:    compiled sources
Compiler:          gcc version 2.95.3 20010315 (release) [FreeBSD]
OS:                FreeBSD (i386) release 4.5-RC
OS/Compiler notes: 

Hi

The current observed behaviour of Konsole is to override stty erase  value setting it to ^? and use ^?
for Backspace key value.
(Konsole keys are set to xterm xfree v4 i.e. default configuration)

While this works OK for most programs it
doesn't always work for all programs if default OS
stty erase value is ^H.  In fact
the xterm termcap/terminfo is kb=^H 
as it is distributed by XFree.

Konsole should change it's Backspace key to emit current (default)
stty erase code and not vice versa;
this is how things are done by other cross-platform terminal emulators
(e.g. XFree86 xterm).

(Submitted via bugs.kde.org)
(Called from KBugReport dialog)
Comment 1 Ričardas Čepas 2003-02-25 12:18:58 UTC
In addition that changing of stty erase value to ^? is out of sync with vt420pc.keytab 
entry where Backspace key character is set to 8.  If konsole insists on changing 
ERASE value it should at least do that according to keymap/terminal chosen. 
Comment 2 Robert Knight 2007-12-19 04:04:02 UTC
Created attachment 22611 [details]
Patch to get the erase character from the terminal, rather than setting the terminal erase char to match the entry for the Backspace key in the .keytab file
Comment 3 Robert Knight 2007-12-19 04:10:28 UTC
The above patch applies to Konsole in trunk (KDE 4.0).

Already committed for KDE 4 is support for an 'Erase' command which can be set as the result for a key sequence.  eg:

key Backspace : Erase

When backspace is pressed, this will be translated into the erase character used by the terminal.

I have not committed it yet because I haven't tested it on any system other than my Ubuntu Linux 6.10 desktop.  I looked at the xterm code which gets/sets the terminal attributes including the erase character on startup, but it is very convoluted with #ifdefs everywhere.
Comment 4 Robert Knight 2008-07-13 02:55:58 UTC
Closing as REMIND until this issue is brought up again with regards to newer systems.