Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Delete character

From Wikipedia, the free encyclopedia
ASCII character number 127

Thedeletecontrol character (also calledDEL orrubout) is the last character in theASCII repertoire, with the code127.[1] It is supposed to do nothing and was designed to erase incorrect characters onpaper tape. It is denoted as^? incaret notation and isU+007F inUnicode.

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

History

[edit]
 ·  NUL
·CR
·LF
·DEL
·SP
"Delete" along with some other ASCII control characters andspace as they appear on punched tape

This code was originally used to mark deleted characters onpunched tape, since any character could be changed to all 1s 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] Inhexadecimal, 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 aspadding to slow down printing after newlines, though the all-zeroNUL was more often used.

TheTeletype Model 33 provided a key labelledRUB OUT to punch this character (after the user backed up the tape using another button), and did not provide a key that produced thebackspace 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 fromDigital Equipment Corporation. OnVT100 compatible terminals, this is the character generated by the key labeledDelete.[4][5] On later terminals, such as theVT510, 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 a problem in that it could only be programmed to erase the previous character forone 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 shortcutsCtrl+H orCtrl+? do something, even though these sent the same code as BS and DEL, assuming the backspace key was sending the other code.

A key markedBackspace ← that sends BS is by far the most common on modern terminals and emulators. To ensure text is not deleted backwards, the key marked "Delete" on many terminals does not send DEL and instead sends anescape sequence such as^[[3~.[7]

Current use

[edit]

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

DOS/Windows never used this character in any way. TheBIOS keyboard driver produced backspace when the backspace key was typed andNUL withscan code 0x53 when the delete key was typed.[8] In Windows, the delete key maps toVK_DELETE (0x2E).[9]EGA/VGA fonts, as fonts used byWin32 console, usually have the"house" symbol ⌂ at 127 (0x7F) code point (seeCode page 437 for details). However, its legacy can be seen in parts of the Windows operating system: as an example,Control+← Backspace inNotepad andFile Explorer used to insert the delete character[10][11] until it was changed inversion 1809 to make it delete the previous word, as it does in most modern applications.[12][13]

See also

[edit]

References

[edit]
  1. ^Vint Cerf (October 16, 1969).ASCII format for Network Interchange.IETF.doi:10.17487/RFC0020.RFC20.
  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 fromthe original on 2016-03-14. Retrieved2015-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 fromthe original on 2016-03-04. Retrieved2015-04-12.
  8. ^"Keyboard scan code/Character code combinations - PC DOS Retro". Archived fromthe original on 2020-05-01. Retrieved2020-04-19.
  9. ^"Virtual-Key Codes (Winuser.h) - Win32 apps". 22 June 2022.
  10. ^"Shortcuts - Notepad CTRL-Backspace behavior".Super User.
  11. ^"When renaming a file in Windows, CTRL + Backspace does not delete whole words".Super User.
  12. ^Kaufman, Lori (2018-11-23)."The New and Improved Windows 10 Notepad: Useful Tips and Features".MakeUseOf.
  13. ^"Ctrl+Backspace".Computer Hope. 2025-06-01.
Retrieved from "https://en.wikipedia.org/w/index.php?title=Delete_character&oldid=1298581813"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp