Content deleted Content added
→End of line: is OS X really unix based? it does have some bsd code in kernel and user land, i still want to call it unix-like |
→Escape: read the ecma-48. Tag: Reverted |
||
Line 276:
Many more of the control characters have been assigned meanings quite different from their original ones. The "escape" character (ESC, code 27), for example, was intended originally to allow sending of other control characters as literals instead of invoking their meaning, an "escape sequence". This is the same meaning of "escape" encountered in URL encodings, [[C (programming language)|C language]] strings, and other systems where certain characters have a reserved meaning. Over time this interpretation has been co-opted and has eventually been changed.
In modern usage, an ESC sent ''to'' the terminal usually indicates the start of a command sequence, which can be used to address the cursor, scroll a region, set/query various terminal properties, and more. They are usually in the form of a so-called "[[ANSI escape code]]" (often starting with a "[[Control Sequence Introducer]]", "CSI", "{{Mono|ESC [}}") from ECMA-48 (1972) and its successors. Some escape sequences do not have introducers or delimiters, like the [[VT100]] full reset command "{{Mono|ESC c}}". <ref>{{cite web|url=https://invisible-island.net/xterm/ctlseqs/ctlseqs.html|title=XTerm Control Sequences|access-date=January 17, 2024}}</ref>
In contrast, an ESC read ''from'' the terminal is most often used as an [[out-of-band data|out-of-band]] character used to terminate an operation or special mode, as in the [[Text Editor and Corrector|TECO]] and [[Vi (text editor)|vi]] [[text editor]]s. In [[graphical user interface]] (GUI) and [[window (computing)|windowing]] systems, ESC generally causes an application to abort its current operation or to [[exit (system call)|exit]] (terminate) altogether.
|