📄 1073-1074.html
字号:
<HTML>
<HEAD>
<TITLE>Linux Complete Command Reference:Special Files:EarthWeb Inc.-</TITLE>
</HEAD>
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<SCRIPT>
<!--
function displayWindow(url, width, height) {
var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>
-->
<!-- ISBN=0672311046 //-->
<!-- TITLE=Linux Complete Command Reference//-->
<!-- AUTHOR=Red Hat//-->
<!-- PUBLISHER=Macmillan Computer Publishing//-->
<!-- IMPRINT=Sams//-->
<!-- CHAPTER=04 //-->
<!-- PAGES=1063-1102 //-->
<!-- UNASSIGNED1 //-->
<!-- UNASSIGNED2 //-->
<P><CENTER>
<a href="1070-1072.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="1075-1076.html">Next</A></CENTER></P>
<A NAME="PAGENUM-1073"><P>Page 1073</P></A>
<P>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).</P>
<P>
<B>COMPARISONS WITH OTHER TERMINALS</B>
</P>
<P>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).</P>
<P>
<B>CONTROL-CHARACTER HANDLING</B>
</P>
<P>The vt102 also recognized the following control characters:
<P>NUL (0x00) was ignored.<BR>
ENQ (0x05) triggered an answerback message.<BR>
DC1 (0x11, ^Q, XON) resumed transmission.<BR>
DC3 (0x13, ^S, XOFF) caused vt100 to ignore (and stop transmitting) all codes except
XOFF and XON.<BR>
VT100-like DC1/DC3 processing may be enabled by the
tty driver.</P>
<P>
The xterm program (in vt100 mode) recognizes the control characters
BEL, BS, HT, LF, VT, FF, CR, SO, SI, ESC.</P>
<P>
<B>ESCAPE SEQUENCES</B>
</P>
<P>The following VT100 console sequences are not implemented on the Linux console:
</P>
<TABLE>
<TR><TD>
Escape Sequence
</TD><TD>
Function
</TD><TD>
Description
</TD></TR><TR><TD>
ESC N
</TD><TD>
SS2
</TD><TD>
Single shift 2. (Select G2 character set for the
next character only.)
</TD></TR><TR><TD>
ESC O
</TD><TD>
SS3
</TD><TD>
Single shift 3. (Select G3 character set for the next
character only.)
</TD></TR><TR><TD>
ESC P
</TD><TD>
DCS
</TD><TD>
Device control string (ended by
ESC \).
</TD></TR><TR><TD>
ESC X
</TD><TD>
SOS
</TD><TD>
Start of string.
</TD></TR><TR><TD>
ESC ^
</TD><TD>
PM
</TD><TD>
Privacy message (ended by ESC\).
</TD></TR><TR><TD>
ESC \
</TD><TD>
ST
</TD><TD>
String terminator.
</TD></TR><TR><TD>
ESC * ...
</TD><TD>
</TD><TD>
Designate G2 character set.
</TD></TR><TR><TD>
ESC + ...
</TD><TD>
</TD><TD>
Designate G3 character set.
</TD></TR></TABLE>
<P>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:
</P>
<TABLE>
<TR><TD>
ESC ] 0 ; txt BEL
</TD><TD>
Set icon name and window title to
txt.
</TD></TR><TR><TD>
ESC ]1 ; txt BEL
</TD><TD>
Set icon name to txt.
</TD></TR><TR><TD>
ESC ] 2 ; txt BEL
</TD><TD>
Set window title to txt.
</TD></TR><TR><TD>
ESC ] 4 6 ; name BEL
</TD><TD>
Change log file to
name (normally disabled by a compile-time option).
</TD></TR><TR><TD>
ESC ] 5 0 ; fn BEL
</TD><TD>
Set font to fn.
</TD></TR></TABLE>
<P>It recognizes the following with slightly modified meaning:
</P>
<TABLE>
<TR><TD>
ESC 7 DECSC
</TD><TD>
Save cursor
</TD></TR><TR><TD>
ESC 8 DECRC
</TD><TD>
Restore cursor
</TD></TR></TABLE>
<A NAME="PAGENUM-1074"><P>Page 1074</P></A>
<P>It also recognizes</P>
<TABLE>
<TR><TD>
ESC F
</TD><TD>
</TD><TD>
Cursor to lower-left corner of screen (if enabled by
the hpLowerleftBugCompat resource).
</TD></TR><TR><TD>
ESC l
</TD><TD>
</TD><TD>
Memory lock (per HP terminals). Locks memory above
the cursor.
</TD></TR><TR><TD>
ESC m
</TD><TD>
</TD><TD>
Memory unlock (per HP terminals).
</TD></TR><TR><TD>
ESC n
</TD><TD>
LS2
</TD><TD>
Invoke the G2 character set.
</TD></TR><TR><TD>
ESC o
</TD><TD>
LS3
</TD><TD>
Invoke the G3 character set.
</TD></TR><TR><TD>
ESC j
</TD><TD>
LS3R
</TD><TD>
Invoke the G3 character set as
GR.<BR>
Has no visible effect in xterm.
</TD></TR><TR><TD>
ESC g
</TD><TD>
LS2R
</TD><TD>
Invoke the G2 character set as
GR.<BR>
Has no visible effect in xterm.
</TD></TR><TR><TD>
ESC ~
</TD><TD>
LS1R
</TD><TD>
Invoke the G1 character set as
GR.<BR>
Has no visible effect in xterm.
</TD></TR></TABLE>
<P>
It does not recognize ESC % ...</P>
<P>
<B>CSI SEQUENCES</B>
</P>
<P>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.</P>
<P>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.
</P>
<P>
<B>BUGS</B>
</P>
<P>In 2.0.23, CSI is broken, and NUL is not ignored inside escape sequences.</P>
<P>
<B>See Also</B>
</P>
<!-- CODE SNIP //-->
<PRE>
console(4), console_ioctl(4), charsets(4)
</PRE>
<!-- END CODE SNIP //-->
<P>Linux, 31 October 1996</P>
<H3><A NAME="ch04_ 5">
console ioctls
</A></H3>
<P>console ioctls—Ioctls for console terminal and virtual consoles</P>
<P>
<B>DESCRIPTION</B>
</P>
<P>The following Linux-peculiar ioctl() requests are supported. Each requires a third argument, assumed here to be
argp.</P>
<P>
<CENTER>
<TABLE BGCOLOR="#FFFF99">
<TR><TD><B>
WARNING
</B></TD></TR>
<TR><TD>
<BLOCKQUOTE>
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.
</BLOCKQUOTE></TD></TR>
</TABLE></CENTER>
</P>
<P><CENTER>
<a href="1070-1072.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="1075-1076.html">Next</A></CENTER></P>
</td>
</tr>
</table>
<!-- begin footer information -->
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -