-->

Previous | Table of Contents | Next

Page 1073

Normal tracking mode (not implemented in Linux 2.0.24) sends an escape sequence on both button press and release. Modifier information is also sent. It is enabled by sending ESC [ ? 1000 h and disabled with ESC [ 1000 l. On button press or release, xterm sends ESC [ M bxy. The low two bits of b encode button information: 0=MB1 pressed, 1=MB2 pressed, 2=MB3 pressed, 3=release. The upper bits encode what modifiers were down when the button was pressed and are added together: 4=Shift, 8=Meta, 16=Control. Again, x and y are the x and y coordinates of the mouse event. The upper-left corner is (1,1).

COMPARISONS WITH OTHER TERMINALS

Many different terminal types are described, like the Linux console, as being VT100-compatible. Here we discuss differences between the Linux console and the two most important others, the DEC VT102 and xterm(1).

CONTROL-CHARACTER HANDLING

The vt102 also recognized the following control characters:

NUL (0x00) was ignored.
ENQ (0x05) triggered an answerback message.
DC1 (0x11, ^Q, XON) resumed transmission.
DC3 (0x13, ^S, XOFF) caused vt100 to ignore (and stop transmitting) all codes except XOFF and XON.
VT100-like DC1/DC3 processing may be enabled by the tty driver.

The xterm program (in vt100 mode) recognizes the control characters BEL, BS, HT, LF, VT, FF, CR, SO, SI, ESC.

ESCAPE SEQUENCES

The following VT100 console sequences are not implemented on the Linux console:

Escape Sequence Function Description
ESC N SS2 Single shift 2. (Select G2 character set for the next character only.)
ESC O SS3 Single shift 3. (Select G3 character set for the next character only.)
ESC P DCS Device control string (ended by ESC \).
ESC X SOS Start of string.
ESC ^ PM Privacy message (ended by ESC\).
ESC \ ST String terminator.
ESC * ... Designate G2 character set.
ESC + ... Designate G3 character set.

The program xterm (in vt100 mode) recognizes ESC c, ESC # 8, ESC >, ESC =, ESC D, ESC E, ESC H, ESC M, ESC N, ESC O, ESC P ... ESC ESC Z (it answers ESC [ ? 1 ; 2 c, "I am a vt100 with advanced video option") and ESC ^ ... ESC with the same meanings as indicated above. It accepts ESC (, ESC ), ESC *, ESC + followed by 0, A, B for the DEC special character and line drawing set, UK, and USASCII, respectively. It accepts ESC ] for the setting of certain resources:

ESC ] 0 ; txt BEL Set icon name and window title to txt.
ESC ]1 ; txt BEL Set icon name to txt.
ESC ] 2 ; txt BEL Set window title to txt.
ESC ] 4 6 ; name BEL Change log file to name (normally disabled by a compile-time option).
ESC ] 5 0 ; fn BEL Set font to fn.

It recognizes the following with slightly modified meaning:

ESC 7 DECSC Save cursor
ESC 8 DECRC Restore cursor

Page 1074

It also recognizes

ESC F Cursor to lower-left corner of screen (if enabled by the hpLowerleftBugCompat resource).
ESC l Memory lock (per HP terminals). Locks memory above the cursor.
ESC m Memory unlock (per HP terminals).
ESC n LS2 Invoke the G2 character set.
ESC o LS3 Invoke the G3 character set.
ESC j LS3R Invoke the G3 character set as GR.
Has no visible effect in xterm.
ESC g LS2R Invoke the G2 character set as GR.
Has no visible effect in xterm.
ESC ~ LS1R Invoke the G1 character set as GR.
Has no visible effect in xterm.

It does not recognize ESC % ...

CSI SEQUENCES

The xterm program (as of XFree86 3.1.2G) does not recognize the blink or invisible-mode SGRs. Stock X11R6 versions do not recognize the color-setting SGRs. All other ECMA-48 CSI sequences recognized by Linux are also recognized by xterm, and vice versa.

The xterm program will recognize all of the DEC Private Mode sequences listed earlier, but none of the Linux private-mode sequences. For discussion of xterm's own private-mode sequences, refer to the Xterm Control Sequences document by Edward Moy and Stephen Gildea, available with the X distribution.

BUGS

In 2.0.23, CSI is broken, and NUL is not ignored inside escape sequences.

See Also


console(4), console_ioctl(4), charsets(4)

Linux, 31 October 1996

console ioctls

console ioctls—Ioctls for console terminal and virtual consoles

DESCRIPTION

The following Linux-peculiar ioctl() requests are supported. Each requires a third argument, assumed here to be argp.

WARNING
If you use the following information, you are going to burn yourself. Ioctls are undocumented Linux internals, liable to be changed without warning. Use POSIX functions.

Previous | Table of Contents | Next