aboutsummaryrefslogtreecommitdiff
path: root/FAQ
diff options
context:
space:
mode:
authorWolfgang Corcoran-Mathe <first.lord.of.teal@gmail.com>2014-07-25 13:32:29 -0400
committerRoberto E. Vargas Caballero <k0ga@shike2.com>2014-07-26 10:11:08 +0200
commite8f3513bf4d953176ae932c5d7eb5c374b05a2a0 (patch)
tree54125ece7bb877d51d217275bb50973277e691ce /FAQ
parentf210ea26c444607980d5de17ed7d4e62bb813631 (diff)
downloadst-patched-e8f3513bf4d953176ae932c5d7eb5c374b05a2a0.tar.bz2
st-patched-e8f3513bf4d953176ae932c5d7eb5c374b05a2a0.tar.xz
st-patched-e8f3513bf4d953176ae932c5d7eb5c374b05a2a0.zip
Add info about Backspace and Delete to the FAQ
Here is a modest attempt at cleaning it up a little bit. I changed a few phrases that seemed awkward, but I think the content is the same. -- Wolfgang Corcoran-Mathe Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
Diffstat (limited to 'FAQ')
-rw-r--r--FAQ87
1 files changed, 43 insertions, 44 deletions
diff --git a/FAQ b/FAQ
index 2ee5ec7..a47c024 100644
--- a/FAQ
+++ b/FAQ
@@ -104,54 +104,53 @@ This is an issue that was discussed in suckless mailing list
104<http://lists.suckless.org/dev/1404/20697.html>: 104<http://lists.suckless.org/dev/1404/20697.html>:
105 105
106 Well, I am going to comment why I want to change the behaviour 106 Well, I am going to comment why I want to change the behaviour
107 of this key. When ascii was defined in 1968 communication 107 of this key. When ASCII was defined in 1968, communication
108 with computers were done using punched cards, or hardcopy 108 with computers was done using punched cards, or hardcopy
109 terminals (basically a typewritter machine connected with 109 terminals (basically a typewriter machine connected with the
110 the computer using a serial port). Due to this, ascii defines 110 computer using a serial port). ASCII defines DELETE as 7F,
111 DELETE as 7F, because in the puched cards, it means all the 111 because, in punched-card terms, it means all the holes of the
112 holes of the card punched, so it is a kind of 'phisical 112 card punched; it is thus a kind of 'physical delete'. In the
113 delete'. In the same way, BACKSPACE key was a non destructive 113 same way, the BACKSPACE key was a non-destructive backspace,
114 back space, as in typewriter machines. So, if you wanted 114 as on a typewriter. So, if you wanted to delete a character,
115 to delete a character, you had to BACKSPACE and then DELETE. 115 you had to BACKSPACE and then DELETE. Another use of BACKSPACE
116 Other use of BACKSPACE was accented characters, for example 116 was to type accented characters, for example 'a BACKSPACE `'.
117 'a BACKSPACE `'. The VT100 had no BACKSPACE key, it was 117 The VT100 had no BACKSPACE key; it was generated using the
118 generated using the CONTROL key as another control character 118 CONTROL key as another control character (CONTROL key sets to
119 (CONTROL key sets to 0 b7 b6 b5, so it converts H (code 119 0 b7 b6 b5, so it converts H (code 0x48) into BACKSPACE (code
120 0x48) into BACKSPACE (code 0x08)), but it had a DELETE key 120 0x08)), but it had a DELETE key in a similar position where
121 in a similar position where BACKSPACE key is located today 121 the BACKSPACE key is located today on common PC keyboards.
122 in common PC keyboards. All the terminal emulators emulated 122 All the terminal emulators emulated the difference between
123 correctly the difference between these keys, and backspace 123 these keys correctly: the backspace key generated a BACKSPACE
124 key generated a BACKSPACE (^H) and delete key generated a 124 (^H) and delete key generated a DELETE (^?).
125 DELETE (^?). 125
126 126 But a problem arose when Linus Torvalds wrote Linux. Unlike
127 But the problem arised when Linus Torvald wrote Linux, and 127 earlier terminals, the Linux virtual terminal (the terminal
128 he did that the virtual terminal (the terminal emulator 128 emulator integrated in the kernel) returned a DELETE when
129 integrated in the kernel) returns a DELETE when backspace 129 backspace was pressed, due to the VT100 having a DELETE key in
130 was pressed, due to the fact of the key in that position 130 the same position. This created a lot of problems (see [1]
131 in VT100 was a delete key. This created a lot of problems 131 and [2]). Since Linux has become the king, a lot of terminal
132 (you can see it in [1] and [2]), and how Linux became the 132 emulators today generate a DELETE when the backspace key is
133 king, a lot of terminal emulators today generate a DELETE 133 pressed in order to avoid problems with Linux. The result is
134 when backspace key is pressed in order to avoid problems 134 that the only way of generating a BACKSPACE on these systems
135 with linux. It causes that the only way of generating a 135 is by using CONTROL + H. (I also think that emacs had an
136 BACKSPACE in these systems is using CONTROL + H. I also 136 important point here because the CONTROL + H prefix is used
137 think that emacs had an important point here because CONTROL 137 in emacs in some commands (help commands).)
138 + H prefix is used in emacs in some commands (help commands).
139 138
140 From point of view of the kernel, you can change the key 139 From point of view of the kernel, you can change the key
141 for deleting a previous character with stty erase. When you 140 for deleting a previous character with stty erase. When you
142 connect a real terminal into a machine you describe the 141 connect a real terminal into a machine you describe the type
143 type of terminal, so getty configure the correct value of 142 of terminal, so getty configures the correct value of stty
144 stty erase for this terminal, but in the case of terminal 143 erase for this terminal. In the case of terminal emulators,
145 emulators you don't have any getty that can set the correct 144 however, you don't have any getty that can set the correct
146 value of stty erase, so you always get the default value. 145 value of stty erase, so you always get the default value.
147 So it means that in case of changing the value of the 146 For this reason, it is necessary to add 'stty erase ^H' to your
148 backspace keyboard, you have to add a 'stty erase ^H' into 147 profile if you have changed the value of the backspace key.
149 your profile. Of course, other solution can be that st 148 Of course, another solution is for st itself to modify the
150 itself modify the value of stty erase. I have usually the 149 value of stty erase. I usually have the inverse problem:
151 inverse problem, when I connect with non Unix machines, and 150 when I connect to non-Unix machines, I have to press CONTROL +
152 I have to press control + h to get a BACKSPACE, or the 151 h to get a BACKSPACE. The inverse problem occurs when a user
153 inverse, when a user connects to my unix machines from a 152 connects to my Unix machines from a different system with a
154 different system with a correct backspace key. 153 correct backspace key.
155 154
156 [1] http://www.ibb.net/~anne/keyboard.html 155 [1] http://www.ibb.net/~anne/keyboard.html
157 [2] http://www.tldp.org/HOWTO/Keyboard-and-Console-HOWTO-5.html 156 [2] http://www.tldp.org/HOWTO/Keyboard-and-Console-HOWTO-5.html