1.1 VT100 Command Set Digital, ANSI-X3.64, ISO-6429, ECMA-48, PC-ANSI and SCO-ANSI commands __________________________________________________________________________ dataComet documentation. (Rev. 1/27/08) Copyright 1995 databeast, Inc. All Rights Reserved. ___________________________________________________ This document has information on (select and use "Find..." to go to the section): Modes Programmable LEDs Programmable UDKs (User Defined Keys) Cursor Movement Commands SCO-ANSI sequences Additional ISO-6429 (ECMA-48) sequences Screen Editing (Erase/Insert/Delete) Line Size Commands (Double-Height and Double-Width) Character Attributes SCO-ANSI colors Protected Area Attributes Scrolling Region Tab stops Printing Character Set (G0 and G1 Designators) PC-ANSI graphics characters SCO-ANSI graphics characters Cursor Position Report Status Report Identify Reset Confidence Tests VT52 Compatible Mode _______________________________________________________________________ ANSI Compatible Mode _______________________________________________________________________ Note that the '!C>command\000' macro allows you to set any of the modes listed below in a key macro. "\nnn" -> a decimal number representing a character, e.g., "\027" -> . This encoding allows you to use the strings listed below directly in dataComet macros. Unless otherwise noted, all command sequences listed are supported by dataComet. _______________________________________________________________________ Modes _______________________________________________________________________ To Set To Reset Mode Name Mode Sequence Mode Sequence ANSI/VT52 mode ANSI \027< VT52 \027[?2l Autowrap On \027[?7h Off \027[?7l Column mode 132 Col \027[?3h 80 Col \027[?3l Cursor invisible Invisible \027[?25h Visible \027[?25l Erasure mode Erase all \027[6h Protected \0276l Insert mode Insert \027[4h Overwrite \027[4l Line feed/new line New line \027[20h Line feed \027[20l Nat'l character set ASCII \027[?42h Local Nat'l \027[?42l Origin mode Relative \027[?6h Absolute \027[?6l Print form feed Add FF \027[?18h No FF added \027[?18l Print extent Whole page \027[?19h Scroll rgn. \027[?19l Send/Receive mode Local echo \027[12h Remote echo \027[12l Scrolling mode Smooth \027[?4h Jump \027[?4l Screen mode Reverse \027[?5h Normal \027[?5l Backarrow key Backspace \027[?67h Delete \027[?67l Control Transmission 7-bit \027 F 8-bit \027 G Cursor key mode Application \027[?1h Cursor \027[?l Key auto repeat On \027[?8h Off \027[?8l Keyboard action Locked \027[2h Unlocked \027[2l Keypad mode Application \027= Numeric \027> _______________________________________________________________________ Programmable LEDs _______________________________________________________________________ \027[Ps;Ps;...Psq Ps = 0 or None All LEDs Off 1 L1 on 2 L2 on 3 L3 on 4 L4 on Any other parameter values are ignored. _______________________________________________________________________ Programmable UDKs (User Defined Keys) _______________________________________________________________________ \027PPc;Pl|Key1/Str1;...,KeyN/StrN\156 \027PPc;Pl;Pt;Pm|Key1/Name1?Str1;...,KeyN/NameN?StrN\156 (dataComet Button Bar UDK, optional) Pc is the clear parameter 0 Clear all keys 1 Clear only keys with new settings Pl is the lock parameter (used to select target) 0 FKeys and Button Bar 1 FKeys only 2 Button Bar only 3 Execute a URL string 4 Execute a dataComet macro dataComet always Locks the FKeys and Buttons; this parameter is used to specify which items are affected. Pt is the type parameter (dataComet Button UDK, optional) 0 "Classic" mapping (default if not specified) 1 dataComet mapping Pm is the macro parameter (dataComet Button UDK, optional) 0 StrN is plain text (default if not specified) 1 StrN should be interpreted as a dataComet macro "KeyN" is a string indicating which PFkey/Button is to be remapped. "StrN" is a string parameter with the string to send when the PFkey or button is pressed. The command must always be terminated with the String Terminator sequence, either the ST character (\156) or "\027\" (ESC-\). ____________________________________________________ dataComet mapping ________________________________ "KeyN" "1" = F1, "2" = F2, etc.; KeyN from "1" - "24" apply to the controls in the Button Bar. KeyN from from "101" - "164" apply to the labels and buttons on the left hand side of the emulator screen ("101" = 1). "NameN" is a string parameter with the button name, terminated by a '?'. This parameter is required to set a host-defined button in the button bar which is displayed at the top of the dataComet emulator window. dataComet mapping uses plain ASCII for the string parameters, so the button name and macro are easier to create and maintain. Here's an example which works with UNIX, setting F1 (and the first button) to execute a macro with a delay, and F2 to send "ls -lt": cat << 'EOT' [1;0;1;1|1/Wham?echo !D\003WHAMMO\010;2/lt?ls -lt\010\ 'EOT' Here's an example which executes the macros immediately: cat << 'EOT' [1;4;1;1|1/Wham?echo !D\003WHAMMO\010;2/lt?ls -lt\010\ 'EOT' Here's an example which opens a URL (note the "/?" separators are still included even though no Fkey number or title is used in this example): cat << 'EOT' [1;3;1;1|/?\ 'EOT' ____________________________________________________ ________________________________ "Classic" mapping KeyN is one of the following ________________________________ F1 1 F2 2 etc. ... F16 16 (dataComet extension) F6 17 (Standard) F7 18 F8 19 F9 20 F10 21 F11 23 F12 24 F13 25 F14 26 F15 28 F16 29 F17 31 F18 32 F19 33 F20 34 ________________________________ StrN is a "Classic" UDK string, encoded in hexadecimal (i.e., 'N' = 4E) ________________________________ _______________________________________________________________________ Cursor Movement Commands _______________________________________________________________________ Cursor up \027[PnA Cursor down \027[PnB Cursor forward (right) \027[PnC Cursor backward (left) \027[PnD Direct cursor addressing \027[Pl;PcH or \027[Pl;Pcf Index \027D Next Line \027E Reverse index \027M Save cursor and attributes \0277 Restore cursor and attributes \0278 DECBI Back Index Char \0276 DECFI Forward Index Char \0279 SCO-ANSI sequences from ANSI X3.64 Cursor Back Tab (CBT) \027[PnZ Cursor Next Line (CNL) \027[PnE Cursor Previous Line (CPL) \027[PnF Horizontal Position Absolute (CHA) \027[PnG or (HPA) \027[Pn' or \027[Pn` Horizontal Position Relative (HPR) \027[Pna Vertical Position Absolute (VPA) \027[Pnd Vertical Position Relative (VPR) \027[Pne Scroll Up (SU) \027[PnS Scroll Down (SD) \027[PnT Additional ISO-6429 (ECMA-48)sequences Cursor-Horizontal-Tab (CHT) \027[PnI Scroll Left (SL) \027[Pn @ (space-@) Scroll Right (SR) \027[Pn A (space-A) _______________________________________________________________________ * Pn = decimal parameter in string of ASCII digits (default 1) * Pl = line number (default 0); Pc = column number (default 0) _______________________________________________________________________ Screen Editing (Erase/Insert/Delete) _______________________________________________________________________ Erase from cursor to end of screen \027[J or \027[0J From beginning of screen to cursor \027[1J Entire screen \027[2J From cursor to end of line \027[K or \027[0K From beginning of line to cursor \027[1K Entire line containing cursor \027[2K Erase Characters (ECH ECMA-48) \027[PnX Insert line \027[PnL Delete line \027[PnM Insert characters \027[Pn@ Delete characters \027[PnP Repeat last char (REP ECMA-48) \027[Pnb _______________________________________________________________________ Line Size Commands (Double-Height and Double-Width) _______________________________________________________________________ Change this line to double-height top half \027#3 Change this line to double-height bottom half \027#4 Change this line to single-width single-height \027#5 Change this line to double-width single-height \027#6 _______________________________________________________________________ Character Attributes _______________________________________________________________________ \027[Ps;Ps;Ps;...,Psm Ps = 0 or None All Attributes Off 1 Bold on 3 Italic on (shown as bold) 4 Underscore on 5 Blink on 7 Reverse video on 8 Invisible on 10 Normal font 11 Alternate font 12 Alternate font shifted +128 22 Bold off 23 Italic off 24 Underscore off 25 Blink off 27 Reverse off 28 Invisible off Colors: Foreground Background Black 30 40 Red 31 41 Green 32 42 Yellow 33 43 Blue 34 44 Magenta 35 45 Cyan 36 46 White 37 47 Variant: Foreground Background Black <0 =0 Red <1 =1 Green <2 =2 Yellow <3 =3 Blue <4 =4 Magenta <5 =5 Cyan <6 =6 White <7 =7 Use of this Variant command is strongly discouraged. It conflicts with the ANSI standard, and is provided only to support some applications which use it. Any other parameter values are ignored. __________________________________________________________ SCO-ANSI colors __________________________________________________________ Select foreground color \027[=PsF Select background color \027[=PsG Select reverse color \027[=PsH Select reverse background color \027[=PsI Select graphic color \027[=PsJ Not Supported Select graphic background color \027[=PsK Not Supported Select intense background \027[=PnD Set color mode from 16 to 8 colors \027[=PnE Also XENIX \027[3;Pnm Unselect Background Color Erase \027[=PnL Pn 0 = Off, Pn 1 = On XENIX color selector sequences Normal colors \027[2;P1;P2m Reverse colors \027[7;P1;P2m P1 = foreground color P2 = background color Report current colors selected \027[=PsM Ps = 0 Report normal colors 1 Report reverse colors 2 Report graphic colors The report format is "forecolor# backcolor#\010" the numbers are sent as ASCII decimal strings SCO-ANSI Color Table __________________________________________________ Ps Color Ps Color __________________________________________________ 0 Black 8 Grey 1 Blue 9 Lt. Blue 2 Green 10 Lt. Green 3 Cyan 11 Lt. Cyan 4 Red 12 Lt. Red 5 Magenta 13 Lt. Magenta 6 Brown 14 Yellow 7 White 15 Lt. White __________________________________________________ SCO-ANSI color selection sequences with 16 background colors are supported when the SCO-ANSI terminal type is selected. _______________________________________________________________________ Protected Areas _______________________________________________________________________ Start Protected Area \027V End Protected Area \027W DEC Protected Character attribute Unprotected \0270"q or \0272"q Protected \0271"q DEC Selective Erase (preserves protected areas) Erase from cursor to end of screen \027[?J or \027[?0J From beginning of screen to cursor \027[?1J Entire screen \027[?2J From cursor to end of line \027[?K or \027[?0K From beginning of line to cursor \027[?1K Entire line containing cursor \027[?2K _______________________________________________________________________ Scrolling Region _______________________________________________________________________ \027[Pt;Pbr Pt is the number of the top line of the scrolling region; Pb is the number of the bottom line of the scrolling region and must be greater than Pt. (The default for Pt is line 1, the default for Pb is the end of the screen) _______________________________________________________________________ Tab stops _______________________________________________________________________ Set tab at current column \027H Clear tab at curent column \027[g or \027[0g * Clear all tabs \027[3g * * see \027[Png PC-ANSI variant below _______________________________________________________________________ Printing _______________________________________________________________________ Print screen \027[i or \027[0i Print without display on \027[5i Print without display off \027[4i Auto print on \027[?5i (lines print as cursor moves off line w/ LF, VT, or FF) Auto print off \027[?4i Print cursor's display line \027[?1i _______________________________________________________________________ Character Set (G0 and G1 Designators) _______________________________________________________________________ Character Set G0 Designator G1 Designator United Kingdom (UK) \027(A \027)A United States (USASCII) \027(B \027)B Graphics characters \027(0 \027)0 and line drawing set Alternate character ROM \027(1 \027)1 Alternate character ROM \027(2 \027)2 graphics characters Lock Shift G0 \015 Lock Shift G1 \014 Lock Shift G1 Right \027~ Lock Shift G2 \027n Lock Shift G2 Right \027} Lock Shift G3 \027o Lock Shift G3 Right \027| Single Shift G2 \027N Single Shift G3 \027O __________________________________________________________ PC-ANSI graphics characters __________________________________________________________ Output character for display \027 when is greater than 159 160 -> 127 161-191 -> 1-31 192-223 -> 128-159 and Output character for display \027[Png where Pn > 5 (to avoid conflict with ANSI Clear Tab command) Use of this command is strongly discouraged. It conflicts with the ANSI standard, and is provided only to support some applications which use it. __________________________________________________________ SCO-ANSI graphics characters __________________________________________________________ Output character from the \027=g alternate graphics set _______________________________________________________________________ Cursor Position Report _______________________________________________________________________ Invoked by \027[6n Response is \027[Pl;PcR * Pl = line number; Pc = column number _______________________________________________________________________ Status Report _______________________________________________________________________ Invoked by \027[5n Response is \027[0n (terminal ok) \027[3n (terminal not ok) _______________________________________________________________________ Identify _______________________________________________________________________ Invoked by \027[c or \027[Oc Response is \027[?1;PsC Ps = 0 Base VT100, no options 1 Processor option (STP) 2 Advanced Video option (AVO) 3 AVO and STP 4 Graphics processor option (GO) 5 GO and STP 6 GO and AVO 7 GO, STP, and AVO Alternately invoked by \027Z (not recommended.) _______________________________________________________________________ Reset _______________________________________________________________________ \027c _______________________________________________________________________ Confidence Tests _______________________________________________________________________ Fill Screen with "E"s \027#8 Invoke Test(s) \027[2;Psy Ps = 1 Power-up self test 8 Repeat selected test(s) indefinitely (until failure or power off) _______________________________________________________________________ VT52 Compatible Mode _____________________________________ Cursor Up \027A Cursor Down \027B Cursor Right \027C Cursor Left \027D Select Graphics character set \027F (selects Bold in dataComet) Select ASCII character set \027G Cursor to home \027H Reverse line feed \027I Erase to end of screen \027J Erase to end of line \027K Direct cursor address \027Ylc (see note 1) Identify \027Z (see note 2) Enter alternate keypad mode \027= Exit alternate keypad mode \027> Enter ANSI mode \027< NOTE 1: Line and column numbers for direct cursor address are single character codes whose values are the desired number plus 37 (in Octal). Line and column numbers start at 1. NOTE 2: Response to \027Z is \027/ Z. _____________________________________________________________________________