Delete character

Last updated

The delete control character (also called DEL or rubout) is the last character in the ASCII repertoire, with the code 127. [1] It is supposed to do nothing and was designed to erase incorrect characters on paper tape. It is denoted as ^? in caret notation and is U+007F in Unicode.

Contents

Terminal emulators may produce DEL when ← Backspace key or Control+← Backspace or Control+? are typed.

History

 ·   NUL
· CR
· LF
·DEL
·SP
"Delete" along with some other ASCII control characters and space as they appear on punched tape

This code was originally used to mark deleted characters on punched tape, since any character could be changed to all ones by punching holes everywhere. If a character was punched erroneously, punching out all seven bits caused this position to be ignored or deleted. [2] [3] In hexadecimal, this is 7F to rub out 7 bits (FF to rubout 8 bits was used for 8-bit codes). This character could also be used as padding to slow down printing after newlines, though the all-zero NUL was more often used.

The Teletype Model 33 provided a key labelled RUB OUT to punch this character (after the user backed up the tape using another button), and did not provide a key that produced the Backspace character (BS). Therefore, a number of less-expensive computer systems that used Teletypes used this key (and thus the Delete code) to ignore the previous mis-typed character. Video terminals designed to replace the teletype then had to place a key that produced this code where Backspace would be expected, in particular in products from Digital Equipment Corporation. On VT100 compatible terminals, this is the character generated by the key labeled Delete. [4] [5] On later terminals, such as the VT510, the key is labeled (called backarrow in the manual [6] ) and by default sent DEL, but could be set up to send BS.

Other terminals designed for systems that did not have a history of using Teletypes would usually make a key at this position send BS, leading to much confusion. Unix, in particular, had an annoying problem in that it could only be programmed to erase the previous character for one of these (not both), thus requiring the user to reconfigure the terminal driver for each brand of terminal. Depending on the type of terminal the designer used, software would sometimes make the shortcuts Ctrl+H or Ctrl+? do something, even though these sent the same code as BS and DEL, assuming the backspace key was sending the other code.

A key marked Backspace ← that sends BS is by far the most common on modern terminals and emulators. To make sure they don't delete backwards, the key marked "Delete" on many terminals does not send DEL and instead sends an escape sequence such as ^[[3~. [7]

Current use

Unix-like operating systems can still use it as the erase character, i.e., to delete the previous character in the line mode. The terminal driver still cannot be programmed to take both this and Backspace: one must be chosen. However, most modern programs bypass this and use libraries such as readline which accepts both codes. Most Unix terminal emulators can be configured to send either Delete or Backspace when the backspace key is pressed.[ citation needed ]

DOS/Windows never used this character in any way. The BIOS keyboard driver produced Backspace when the backspace key was typed and NUL with scan code 0x53 when the delete key was typed. [8] In Windows the delete key maps to VK_DELETE (0x2E). [9] EGA/VGA fonts, as fonts used by Win32 console, usually have the "house" symbol ⌂ at 127 (0x7F) code point, see Code page 437 for details. However, its legacy can be seen in parts of the Windows operating system: as an example, Control+← Backspace in Microsoft Notepad used to insert the delete character [10] until it was changed in 2018 to make it delete the previous word. [11]

See also

Related Research Articles

<span class="mw-page-title-main">ASCII</span> American character encoding standard

ASCII, abbreviated from American Standard Code for Information Interchange, is a character encoding standard for electronic communication. ASCII codes represent text in computers, telecommunications equipment, and other devices. Because of technical limitations of computer systems at the time it was invented, ASCII has just 128 code points, of which only 95 are printable characters, which severely limited its scope. Modern computer systems have evolved to use Unicode, which has millions of code points, but the first 128 of these are the same as the ASCII set.

In computing and telecommunication, a control character or non-printing character (NPC) is a code point in a character set that does not represent a written character or symbol. They are used as in-band signaling to cause effects other than the addition of a symbol to the text. All other characters are mainly graphic characters, also known as printing characters, except perhaps for "space" characters. In the ASCII standard there are 33 control characters, such as code 7, BEL, which rings a terminal bell.

<span class="mw-page-title-main">Text editor</span> Computer software used to edit plain text documents

A text editor is a type of computer program that edits plain text. Such programs are sometimes known as "notepad" software. Text editors are provided with operating systems and software development packages, and can be used to change files such as configuration files, documentation files and programming language source code.

<span class="mw-page-title-main">Teleprinter</span> Device for transmitting messages in written form by electrical signals

A teleprinter is an electromechanical device that can be used to send and receive typed messages through various communications channels, in both point-to-point and point-to-multipoint configurations.

<span class="mw-page-title-main">VT100</span> Computer terminal from Digital Equipment Corporation

The VT100 is a video terminal, introduced in August 1978 by Digital Equipment Corporation (DEC). It was one of the first terminals to support ANSI escape codes for cursor control and other tasks, and added a number of extended codes for special features like controlling the status lights on the keyboard. This led to rapid uptake of the ANSI standard, which became the de facto standard for hardware video terminals and later terminal emulators.

In computer science, an escape sequence is a combination of characters that has a meaning other than the literal characters contained therein; it is marked by one or more preceding characters.

<span class="mw-page-title-main">ANSI escape code</span> Method used for display options on video text terminals

ANSI escape sequences are a standard for in-band signaling to control cursor location, color, font styling, and other options on video text terminals and terminal emulators. Certain sequences of bytes, most starting with an ASCII escape character and a bracket character, are embedded into text. The terminal interprets these sequences as commands, rather than text to display verbatim.

<span class="mw-page-title-main">Control key</span> Key on computer keyboards

In computing, a Control keyCtrl is a modifier key which, when pressed in conjunction with another key, performs a special operation. Similarly to the Shift key, the Control key rarely performs any function when pressed by itself. The Control key is located on or near the bottom left side of most keyboards, with many featuring an additional one at the bottom right.

<span class="mw-page-title-main">Computer terminal</span> Computer input/output device for users

A computer terminal is an electronic or electromechanical hardware device that can be used for entering data into, and transcribing data from, a computer or a computing system. The teletype was an example of an early-day hard-copy terminal and predated the use of a computer screen by decades. Starting in the mid-1970s with machines such as the Sphere 1, Sol-20, and Apple I, terminal circuitry began to be integrated into personal and workstation computer systems, with the computer handling character generation and sometimes outputting to a basic CRT display such as a consumer TV.

<span class="mw-page-title-main">VT220</span> Computer terminal from Digital Equipment Corporation

The VT220 is a computer terminal introduced by Digital Equipment Corporation (DEC) in November 1983. The VT240 added monochrome ReGIS vector graphics support to the base model, while the VT241 did the same in color. The 200 series replaced the successful VT100 series, providing more functionality in a much smaller unit with a much smaller and lighter keyboard. Like the VT100, the VT200 series implemented a large subset of ANSI X.364. Among its major upgrades was a number of international character sets, as well as the ability to define new character sets.

<span class="mw-page-title-main">Alt key</span> Computer key

The Alt keyAlt on a computer keyboard is used to change (alternate) the function of other pressed keys. Thus, the Alt key is a modifier key, used in a similar fashion to the Shift key. For example, simply pressing A will type the letter 'a', but holding down the Alt key while pressing A will cause the computer to perform an Alt+A function, which varies from program to program. The international standard ISO/IEC 9995-2 calls it Alternate key. The key is located on either side of the space bar, but in non-US PC keyboard layouts, rather than a second Alt key, there is an 'Alt Gr' key to the right of the space bar. Both placements are in accordance with ISO/IEC 9995-2. With some keyboard mappings, the right Alt key can be reconfigured to function as an AltGr key although not engraved as such.

<span class="mw-page-title-main">Backspace</span> Key on a keyboard

Backspace is the keyboard key that in typewriters originally pushed the carriage one position backwards, and in modern computer systems typically moves the display cursor one position backwards, deletes the character at that position, and shifts back any text after that position by one character.

A bell character is a device control code originally sent to ring a small electromechanical bell on tickers and other teleprinters and teletypewriters to alert operators at the other end of the line, often of an incoming message. Though tickers punched the bell codes into their tapes, printers generally do not print a character when the bell code is received. Bell codes are usually represented by the label "BEL". They have been used since 1870.

<span class="mw-page-title-main">Teletype Model 33</span> 1963–1981 ASCII communications/computer terminal device

The Teletype Model 33 is an electromechanical teleprinter designed for light-duty office use. It is less rugged and cost less than earlier Teletype models. The Teletype Corporation introduced the Model 33 as a commercial product in 1963, after it had originally been designed for the United States Navy. The Model 33 was produced in three versions:

The LK201 is a detachable computer keyboard introduced by Digital Equipment Corporation of Maynard, Massachusetts in 1982. It was first used by Digital's VT220 ANSI/ASCII terminal and was subsequently used by the Rainbow-100, DECmate-II, and Pro-350 microcomputers and many of Digital's computer workstations such as the VAXstation and DECstation families.

Caret notation is a notation for control characters in ASCII. The notation assigns ^A to control-code 1, sequentially through the alphabet to ^Z assigned to control-code 26 (0x1A). For the control-codes outside of the range 1–26, the notation extends to the adjacent, non-alphabetic ASCII characters.

The C0 and C1 control code or control character sets define control codes for use in text by computer systems that use ASCII and derivatives of ASCII. The codes represent additional information about the text, such as the position of a cursor, an instruction to start a new line, or a message that the text has been received.

<span class="mw-page-title-main">ADM-3A</span> Early video display terminal

The ADM-3A was an influential early video display terminal, introduced in 1976. It was manufactured by Lear Siegler and had a 12-inch screen displaying 12 or 24 lines of 80 characters. It set a new industry low single unit price of $995. Its "dumb terminal" nickname came from some of the original trade publication advertisements. It quickly became commercially successful because of the rapid increase of computer communications speeds, and because of new minicomputer and microcomputer systems released to the market which required inexpensive operator consoles.

<span class="mw-page-title-main">Enquiry character</span> Transmission control character

In computer communications, enquiry is a transmission-control character that requests a response from the receiving station with which a connection has been set up. It represents a signal intended to trigger a response at the receiving end, to see whether it is still present. The response, an answer-back code to the terminal that transmitted the WRU signal, may include station identification, the type of equipment in service, and the status of the remote station.

The POSIX terminal interface is the generalized abstraction, comprising both an application programming interface for programs, and a set of behavioural expectations for users of a terminal, as defined by the POSIX standard and the Single Unix Specification. It is a historical development from the terminal interfaces of BSD version 4 and Seventh Edition Unix.

References

  1. Vint Cerf (October 16, 1969). ASCII format for Network Interchange. IETF. doi: 10.17487/RFC0020 . RFC 20.
  2. Robert C. Martin (2011). The Clean Coder: A Code of Conduct for Professional Programmers. Pearson Education. ISBN   9780132542883.
  3. LaFarr (18 August 2006). ""Paper Tape" First Machinable I/O".
  4. "VT100 Family of Video Terminals". vt100.net.
  5. "VT100 User Guide- Chapter 3 – Table 3-4 Function Key Codes". vt100.net. Archived from the original on 2016-03-14. Retrieved 2015-04-12.
  6. "VT510 Video Terminal Programmer Information – Chapter 5 – ANSI Control Functions". vt100.net.
  7. "VT510 Video Terminal Programmer Information – Chapter 8 – Keyboard Processing". vt100.net. Archived from the original on 2016-03-04. Retrieved 2015-04-12.
  8. "Keyboard scan code/Character code combinations - PC DOS Retro". Archived from the original on 2020-05-01. Retrieved 2020-04-19.
  9. "Virtual-Key Codes (Winuser.h) - Win32 apps". 22 June 2022.
  10. "Shortcuts - Notepad CTRL-Backspace behavior".
  11. "The New and Improved Windows 10 Notepad: Useful Tips and Features". 23 November 2018.