The Backspace solution
Linux and the Backspace Key
--------------------------------------------------------------------------------
Information about dealing with issues related to the backspace key.
--------------------------------------------------------------------------------
Introduction
How to Get the Old Defaults
How to Get the New Defaults
--------------------------------------------------------------------------------
Introduction
In RedHat linux 6.2 and greater the mapping of the delete and backspace keys have changed, but not for the better. The goal of this document is to make the backspace key on your keyboard to erase to the left, and make the delete key erase under the cursor.
Ignoring the fact that it is stty that is used for that purpose they have taken it upon themselves to change the codes generated by the keyboard, despite the fact that the ASA has defined the codes that these keys should generate. It has not been figured out how to correct the keyboard mappings yet but we do know how to correct it in X. Meaning, that with a raw login the mappings will be as Redhat wants but upon X startup the mappings can be corrected to how the user wants.
There are a number of changes required to effect the correction.
--------------------------------------------------------------------------------
How to Get the Old Defaults
If you wish to have the old defaults where the backspace key yields (\010) and the delete key yields (\177), for all xterms when running X do the following.
Put the following in your .Xresources file (or in .Xdefaults if that is what you use).
*VT100.Translations: \
BackSpace: string(0x08) \n\
Delete: string(0x7f) \n\
Note well, that the spaces before the lines in the above VT100.Translations entries are tabs. If you use spaces, then you will not be able to type anything into your xterm windows. You are allowed only one *VT100.Translations: statement. If you already have one you have to add the above to it. The last line must not end with the \n.
Put *ttyModes: erase ^H in your .Xresources file (or in .Xdefaults if that is what you use).
Put stty erase ^H in your .cshrc file (or .bashrc or .profile)
--------------------------------------------------------------------------------
How to Get the New Defaults
If you wish to have the new defaults where the backspace key yields ^? (\177) and the delete key yield ^[[3~), for all xterms when running X do the following.
Put the following in your .Xresources file (or in .Xdefaults if that is what you use).
*VT100.Translations: \
BackSpace: string(0x7f) \n\
Delete: string("\033[3~") \n
More stuff ...
Note well, that the spaces before the lines in the above VT100.Translations entries are tabs. If you use spaces, then you will not be able to type anything into your xterm windows. You are allowed only one *VT100.Translations: statement. If you already have one you have to add the above to it. The last line must not end with the \n.
Put *ttyModes: erase ^? in your .Xresources file (or in .Xdefaults if that is what you use).
Put stty erase ^? in your .cshrc file (or .bashrc or .profile).
0 Comments:
Post a Comment
<< Home