help with X386?
Daniel A. Glasser
dag at gorgon.uucp
Sun Apr 21 10:40:38 AEST 1991
In article <1991Apr18.210155.41901 at eagle.wesleyan.edu>
flinton at eagle.wesleyan.edu writes:
>For what it's worth, DEC's own keyboards (well, their VT220 KB's in VT100 mode)
>send as follows for the keys labeled by DEC as :
> ESC [ 1 7 ~ F6
> ESC [ 1 8 ~ F7
> ESC [ 1 9 ~ F8
> ESC [ 2 0 ~ F9
> ESC [ 2 1 ~ F10
> ESC F11 (ESC)
> BS F12 (BS)
> LF F13 (LF)
> ESC [ 2 6 ~ F14
> ESC [ 2 8 ~ F15 (Help)
> ESC [ 2 9 ~ F16 (Do)
> ESC [ 3 1 ~ F17
> ESC [ 3 2 ~ F18
> ESC [ 3 3 ~ F19
> ESC [ 3 4 ~ F20
>The only ESC [ 1 2 commands I can find are the SRM (Send-Receive Mode)
>commands ESC [ 1 2 h and ESC [ 1 2 l (for setting that mode off and on, resp.),
>not sent by any keys. So I agree, something odd is happening with your xTerm.
The above shows a minor lack of understanding about how these ANSI X3.64 style
escape sequences work. The DEC keyboard function keys (not the PF keys on the
numeric pad) all send a sequence of the form <CSI> Pn ~, where <CSI> is the
C1 (8-bit) control character 9B (or <ESC> [ in 7-bit controls mode), Pn is
an ASCII decimal string (actually, it's not ASCII, but it corresponds to
ASCII, so we'll call it ASCII) representing the key number, and ~ is the
code which, in ASCII, represents the tilde character. The VT2xx/VT3xx/VT4xx
terminals send the following values of Pn for the following keys:
1 Find
2 Replace
3 Select
4 Remove
5 Next Page
6 Previous Page
11 F1 Hold Screen (VT420 only)
12 F2 Print Screen (VT420 only)
13 F3 Set-up (VT420 only)
14 F4 Session (VT420 only)
15 F5 Break (VT420 only)
17 F6
18 F7
19 F8
20 F9
21 F10
23 F11
24 F12
25 F13
26 F14
28 Help
29 Do
31 F17
32 F18
33 F19
34 F20
The set mode/reset mode (SM/RM) sequences are of the form
CSI Pm l
and CSI Pm h
One sets the mode, the other resets it. For DEC private modes
a ? preceeds the mode number. You can (on DEC terminals at least)
specify several modes to be set or reset in one command, but they
must all be either ANSI or DEC private modes.
Saying "The only ESC [ 1 2 commands I can find are"... makes no real
sense, since the '1' and '2' are parameters to the command identified
by the introducer (CSI or ESC [), the intermediate characters (none in
the examples given) and the final (h or l for SM/RM, ~ for DEC FN keys).
[Forgive the nit-picking, but I've gotten rather sick of the amount of
misinformation that goes around about DEC escape sequences. Even most
versions of X-term can't cope with badly formed sequences because of
this type of misunderstanding. If anyone wants a full paper on how these
things are formed, please send me e-mail and I'll send you something long
winded, but accurate.]
Daniel A. Glasser
(Once apon a time a
member of DEC Terminals
Engineering where I learned
this stuff.)
--
Daniel A. Glasser One of those things that goes
dag%gorgon at persoft.com "BUMP! (ouch!)" in the night.
More information about the Comp.unix.sysv386
mailing list