here are the VT 100 terminal codes
From Shafiq Santora <asa...@osf1.gmu.edu>
· alt.ascii-art
· 11 Feb 1996 00:00 · View full thread
· report
For those of you interested in the VT100 character codes, here they are.
A few of you sent me private email requests for info about how to embed
ecs characters in your art, and I will get to that later. But for now,
the terminal codes:
ANSI/VT2xx/VT102/VT100 Control Codes and Escape Sequences
================================================================================
Set and Reset mode
- all codes are prefixed with ASCII code 27 (escape)
- several codes producse effects similar to DCL commands. While the immedeate
effect may be the same, the VAX will not be aware of the terminal changes
unless you enter the equivalent DCL command.
--------------------------------------------------------------------------------
Code Effect Comments
------- ------------------------------ -----------------------------------------
[2h keyboard locked same as <CTRL/S>
[2l keyboard unlocked same as <CTRL/Q>
[4h insert mode same as SET TERMINAL/INSERT
[4l overstrike mode same as SET TERMINAL/OVERSTRIKE
[12h local echo off
[12l local echo on
[20h new line mode on sends <CR><LF> for <RETURN> key
[20l new line mode off sends <CR> for <RETURN> key
[?1h cursor keys: application
[?1l cursor keys: cursor cursor keys move cursor
[?2l VT52 mode same as SET TERMINAL/DEVICE_TYPE=VT52
[?3h 132 column mode same as SET TERMINAL/WIDTH=132
[?3l 80 column mode same as SET TERMINAL/WIDTH=80
[?4h smooth scrolling
[?4l jump scrolling
[?5h screen reverse reverses text and background colors
[?5l screen normal text and background normal colors
[?6h origin mode relative top of scrolling region (x,1)
[?6l origin mode absolute top of screen (x,1)
[?7h auto wrap on same as SET TERMINAL/WRAP
[?7l auto wrap off same as SET TERMINAL/NOWRAP
[?8h auto repeat on
[?8l auto repeat off
[?9h interlace on
[?9l interlace off
[?18h print form feed on same as SET TERMINAL/FORM
[?18l print form feed on same as SET TERMINAL/FORM
[?19h print extent full screen what is printed on local printer
[?19l print extent scrolling region what is printed on local printer
================================================================================
Character Set Selection
-format for character set selection is <ESC>{primary}{final} where <ESC> is
ASCII character 27 (escape). One character each of {primary} and {final} must
be included (see below).
--------------------------------------------------------------------------------
{primary} Logical Character Set
----------- -----------------------
( G0
) G1
* G2 (VT2xx only)
+ G3 (VT2xx only)
{final} Actual Character Set
--------- ----------------------
A U.K. national (VT100/102 only)
B U.S. ASCII
0 special graphics
1 alternate character set ROM (VT100/102 only)
2 alternate special graphics set ROM (VT100/102 only)
< DEC international (VT2xx only)
--------------------------------------------------------------------------------
Logical Character Set Selection
-ASCII character 14 selects logical character set G1. ASCII character 15
selects logical character set G0 (VT100/102 only).
================================================================================
Character Attributes
-the following attributes remain in effect until turned off explicitly with
<ESC>[m or <ESC>[0m.
-several codes may be sent at once by placing a semi-colon between the effect
number, and placing the 'm' at the end of the entire string. For exampe,
<ESC>[1;5m would produce highlighted, flashing characters.
-all sequences preceded by ASCII character 27 (escape).
--------------------------------------------------------------------------------
Code Effect Comments
---- ------------------ --------------------------------------------------------
[m normal same as [0m - turns attributes off
[0m normal same as [m - turns attributes off
[1m bold/highlight
[4m underline may appear as inverse text on some terminals
[5m blink
[7m inverse
--------------------------------------------------------------------------------
Line Attributes
-these sequences effect the chracters on the immedeate line. Attributes are
returned to normal at then end of the line.
-all sequences preceded by ASCII character 27 (escape).
--------------------------------------------------------------------------------
Code Effect Comments
---- --------------------------- -----------------------------------------------
#3 double height top half prints only top half of characters
#4 double height bottom half prints only bottom half of characters
#5 single width, single height normal characters
#6 double width, single height
================================================================================
Scrolling Region
<ESC>[t;br
where: | Example:
<ESC> - ASCII character 27 (escape) | <ESC>[3;14r would set up a
t - top line of scrolling region | scrolling region between rows 3
b - bottom line of scrolling region | and 14 of the terminal screen.
================================================================================
Cursor Movement Commands
-several of these sequences have option counts or cursor positions available.
n represents a count, while l and c represent line and column numbers re-
spectively. Numbers should be placed before the code letter (A, B, D, etc.).
-the cursor position sequence ([l;cH or [l;cf) should not include the semi-
colon unless both positions are included. If only one number is specified, it
is assumed to be l (the line number).
-all sequences preceded with ASCII character 27 (escape).
--------------------------------------------------------------------------------
Code Effect Optional Parameters
------ ------------------ ------------------------------------------------------
[A cursor up n - number of lines to move cursor up
[B cursor down n - number of lines to move cursor down
[C cursor right n - number of lines to move cursor right
[D cursor left n - number of lines to move cursor left
[H cursor placement l - line number
c - column number
[f cursor placement (see above)
D index (cursor down)
M reverse index (cursor up)
E next line
7 save cursor
8 restore cursor
================================================================================
Editing Functions
-these functions effect the line or space the cursor is currently on.
-n represents an optional count (e.g. <ESC>[P deletes once character, while
<ESC>[3L inserts 3 blank lines).
-all sequences preceded by ASCII character 27 (escape)
--------------------------------------------------------------------------------
Code Effect
----- ----------------
[nP delete character
[nL insert line
[nM delete line
================================================================================
Tab Stops
-all sequences preceded by ASCII character 27 (escape).
--------------------------------------------------------------------------------
Code Effect
---- ------------------
H horizontal tab set
[g tab clear
[0g tab clear
[3g clear all tabs
================================================================================
Erasing
-all sequences preceded by ASCII character 27 (escape).
--------------------------------------------------------------------------------
Code Effect
---- ---------------------------------------------------------------------------
[K erase from cursor to end of line
[0K erase from cursor to end of line
[1K erase from beginning of line to cursor
[2K erase entire current line
[J erase from cursor to end of screen
[0J erase from cursor to end of screen
[1J erase from beginning of screen to cursor
[2J erase entire screen
================================================================================
Miscillaneous
-all sequences preceded by ASCII character 27 (escape)
--------------------------------------------------------------------------------
Code Effect Comments
-------- ------------------- ---------------------------------------------------
c reset terminal resets terminal to default values (including such
things as baud, parity, et cetera).
#8 fill screen with Es terminal test
[2;xy invoke tests invokes terminal test x, where x is some number.
information regarding tests, and test numbers,
unavailable.
[0q keyboard LEDs off turns off LEDs on terminal keyboard
[nq keyboard LED n on turns keyboard LED n on, where n is a number be-
tween 1 and 4. Information regarding actual pur-
pose of LEDs unavailable.
================================================================================
Print Commands
-all sequences preceded by ASCII character 27 (escape)
--------------------------------------------------------------------------------
Code Effect Comments
------- -------------------------- ---------------------------------------------
[i print screen
[0i print screen
[4i EXIT printer controller output to terminal screen
[5i ENTER printer controller output to terminal printer
[?1i print cursor line
[?4i EXIT auto print stop printer capture
[?5i ENTER auto print start printer capture
================================================================================
_____________________________________________
| Allen Santora |
| Support Center Assistant |
| UCIS Support Center |
| Thompson Hall, Room 3 (703) 993-8677 |
| asa...@osf1.gmu.edu |
---------------------------------------------
Original message headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f996b,162629b8789983cc,start X-Google-Attributes: gidf996b,public From: Shafiq Santora <asa...@osf1.gmu.edu> Subject: here are the VT 100 terminal codes Date: 1996/02/11 Message-ID: <Pin...@osf1.gmu.edu> X-Deja-AN: 139052239 organization: George Mason University, Fairfax, Virginia, USA content-type: TEXT/PLAIN; charset=US-ASCII mime-version: 1.0 newsgroups: alt.ascii-art
Related ASCII art in the Gallery
Explore these categories from our collection of 11,000+ artworks:
_______ /` _____ `\;, /__(^===^)__\';, / ::: \ ,; | ::: | ,;' '._______.'`jgs
_ _ (o)(o)--. \../ ( )hjw m\/m--m'`--.
_ _
/` \/ `\_ _
\ /` \/ `\
'. .\ /
\/ '. .'
\/jgs __ . . __ (o.\ \/ /.o) \__\/\/__/ /O /==\ O\ (;O/ \/ \O;)
_______ |.-----.| || jgs || ||_ _|| `--)-(--` __[=== o]___ |:::::::::::|\ `-=========-`()
,sSSs ,SSSS_/ ,_ sS/`))\// sS//|_(_/ _, SS\\\ `""-.-'` / sSS` jgs-==-'`'-._\
Make your own ASCII art
Turn images, text or 3D into ASCII, or draw your own – right in your browser.
About this message.
This message was posted publicly to the newsgroup
alt.ascii-art
in 1996 and is mirrored here unchanged as part of the Historic Archives – only email addresses are masked.
The artwork and text belong to their original authors: if you copy a piece, keep the artist's initials or signature intact and credit them where you can.
Are you the author? Contact us to get your posts attributed, connected to your artist profile, or removed.
Report this message
Help us keep the archive clean and accurate. Reports are reviewed by a person – nothing is changed automatically.