Linux BackSpace and Delete Configuration
In Linux, the default configuration of the “backspace” and “delete” keys ha s worried many users. Ideally, the “backspace” key is supposed to erase left, whereas the “delete” key should erase right. However, the problem that crops up sometimes with those two keys in Linux is that they don’t perform their expected functions.
The root of this problem goes back to the early stages of personal computers, when punched tapes were used and many computer related issues like data recovery, was much more challenging. The only thing to do to rectify characters that we re punched wrongly was to put in extra bits in the punched tape. So, the characters which had all the bits punched were considered deleted characters.
Regarding the usage of the “backspace” and “delete” keys, operating systems took different approaches for newlines to be represented. Newlines were executed by applying a carriage return (CR) at the outset, followed by a line-feed (LF). UNIX selected ASCII LF (hexadecimal 0A), which enabled the operating system to render both simultaneously . Macintosh dealt with the matter by opting for CR and MS-DOS. However, Linux couldn’t tackle the backspace-delete issue properly.
The problem is with keymapping. The console in Linux emulates a vt220 terminal, which contains a keymapping configuration in which the console character ASCII BS (0x08) corresponds to “Control H”, ASCII DEL (0x7f) to “Backspace”, and “\e[3~” to “Delete”. There are a number of ways to represent ASCII values. For example, ASCII BS is equal to an octal notation of 010, decimal notation of 8, and hexadecimal notation of 08. The notation '0x' represents a hexadecimal number.
Although there is no clear solution to the Linux backspace-delete configuration problem, there are a few temporary fixes. One of the most effective fixes is changing the keymapping in the Linux system. This may, however, lead to certain problems when other systems are being accessed. The best workaround is to use a script, which alters the input it receives and changes it to the output that the application, such as “telnet” or “rlogin”, expects.
By default, Linux keys are mapped in different ways in the “xterm” and the console. The problem arises because ^H is accessible to applications on the console, but it is not in “xterm”. In xterm, it is used with the [<---] key. Generally, the “terminfo” database handles such problems by mapping strings of specific terminals to the right key, and the “terminfo” alone cannot solve the problem. You need to modify the “xterm” settings, so that the ^H is not mapped.
Sites that offer solutions to issues with “backspace” and “delete” keys in Linux :
Apparently, the best Linux distributions available today, such as openSUSE,
Ubuntu, Debian, Linux Mint, Fedora, Arch Linux, and Gentoo, have dealt with the backspace-delete key configuration issue successfully. Still, some older versions of Linux continue to have nagging problems with the “backspace” and “delete” keys.