Make a branch to make krunner Good Enough For Aaron™.
[kdebase/uwolfer.git] / apps / konsole / developer-doc / old-documents / More / Eterm.ref
blob849be1f3bf042a28a62ce16cd5aefda7818f84d4
1 --------------------------------------------------------------------------
2                          Eterm Technical Reference
3 --------------------------------------------------------------------------
4      Reworked from XTerm documentation and from other sources
6 Definitions
8 c       The literal character c.
10 C       A single (required) character.
12 Ps      A single (usually optional) numeric parameter, composed of one or
13         more digits.
15 Pm      A multiple numeric parameter composed of any number of single
16         numeric parameters, separated by ; character(s).
18 Pt      A text parameter composed of printable characters.
20 [-]     marks unimplemented sequences
21 [*]     marks Eterm-specific (non-ANSI/ISO) sequences
22 --------------------------------------------------------------------------
24 ENQ             Enquiry (Ctrl-E), Send Device Attributes (DA)
25                   -> request attributes from terminal
26                   -> ESC[?1;2c
27                   (``I am a VT100 with Advanced Video Option.'')
28 BEL             Bell (Ctrl-G)
29 BS              Backspace (Ctrl-H)
30 TAB             Horizontal Tab (HT) (Ctrl-I)
31 LF              Line Feed or New Line (NL) (Ctrl-J)
32 VT              Vertical Tab (Ctrl-K) same as LF
33 FF              Form Feed or New Page (NP) (Ctrl-L) same as LF
34 CR              Carriage Return (Ctrl-M)
35 SO              Shift Out (Ctrl-N), invokes the G1 character set
36                 -> Switch to Alternate Character Set
37 SI              Shift In (Ctrl-O), invokes the G0 character set (the default)
38                 -> Switch to Standard Character Set
39 SPC             Space Character
41 ESC # 8         DEC Screen Alignment Test (DECALN)
43 Character Sets
44 --------------------------------------------------------------------------
45 ESC ( C         Designate G0 Character Set (ISO 2022)
46 ESC ) C         Designate G1 Character Set (ISO 2022)
47 ESC * C         Designate G2 Character Set (ISO 2022)
48 ESC + C         Designate G3 Character Set (ISO 2022)
49 ESC $ C         Designate Kanji Character Set
50                 where
51                   C = 0  -> DEC Special Character and Line Drawing Set
52                   C = A  -> United Kingdom (UK)
53                   C = B  -> United States (USASCII)
54 [-]               C = <  -> Multinational character set
55 [-]               C = 5  -> Finnish character set
56 [-]               C = C  -> Finnish character set
57 [-]               C = K  -> German character set
59 ESC 7           Save Cursor (SC)
60 ESC 8           Restore Cursor (RC)
61 ESC =           Application Keypad (SMKX)
62 ESC >           Normal Keypad (RMKX)
64         - If the numeric keypad is activated, e.g. Num_Lock has been
65           pressed, numbers or control functions are generated by the
66           numeric keypad (see Key Codes section)
68 ESC D           Index (IND)
69 ESC E           Next Line (NEL)
70 ESC H           Tab Set (HTS)
71 ESC M           Reverse Index (RI)
72 [-] ESC N       Single Shift Select of G2 Character Set (SS2):
73                 affects next character only
74 [-] ESC O       Single Shift Select of G3 Character Set (SS3):
75                 affects next character only
77 ESC Z           Obsolete form of ESC [ c
78                 Optional (compile-time) returns -> ESC[?1;2C
80 ESC [ Ps @      Insert Ps (Blank) Character(s) [default: 1] (ICH)
81 ESC [ Ps A      Cursor Up Ps Times [default: 1] (CUU)
82 ESC [ Ps B      Cursor Down Ps Times [default: 1] (CUD)
83 ESC [ Ps C      Cursor Forward Ps Times [default: 1] (CUF)
84 ESC [ Ps D      Cursor Backward Ps Times [default: 1] (CUB)
85 ESC [ Ps E      Cursor Down Ps Times [default: 1] and to first column
86 ESC [ Ps F      Cursor Up Ps Times [default: 1] and to first column
87 ESC [ Ps G      Cursor to Column Ps (HPA)
89 ESC [ Ps;Ps H   Cursor Position [row;column] [default: 1;1] (CUP)
90 ESC [ Ps I      Move forward Ps [default: 1] tab stops
91 ESC [ Ps J      Erase in Display (ED)
92                   Ps = 0  -> Clear Below (default)
93                   Ps = 1  -> Clear Above
94                   Ps = 2  -> Clear All
95 ESC [ Ps K      Erase in Line (EL)
96                   Ps = 0  -> Clear to Right (default)
97                   Ps = 1  -> Clear to Left (EL1)
98                   Ps = 2  -> Clear All
99 ESC [ Ps L      Insert Ps Line(s) [default: 1] (IL)
100 ESC [ Ps M      Delete Ps Line(s) [default: 1] (DL)
101 ESC [ Ps P      Delete Ps Character(s) [default: 1] (DCH)
102 [-] ESC [ Ps;Ps;Ps;Ps;Ps T
103                 Initiate hilite mouse tracking. Parameters are
104                 [func;startx;starty;firstrow;lastrow].
105                 See the section Mouse Tracking.
106 ESC [ Ps W      Tabulator functions
107                   Ps = 0  -> Tab Set (HTS)
108                   Ps = 2  -> Tab Clear (TBC), Clear Current Column (default)
109                   Ps = 5  -> Tab Clear (TBC), Clear All
110 ESC [ Ps X      Erase Ps Character(s) [default: 1] (ECH)
111 ESC [ Ps Z      Move backward Ps [default: 1] tab stops
112 ESC [ PS `      == ESC [ PS G
113 ESC [ Ps a      == ESC [ Ps C
115 ESC [ Ps c      Send Device Attributes (DA)
116                 Ps = 0 or omitted -> request attributes from terminal
117                   -> ESC[?1;2c
118                   (``I am a VT100 with Advanced Video Option.'')
119 ESC [ Ps d      Cursor to Line Ps (VPA)
120 ESC [ Ps e      == ESC [ Ps A
121 ESC [ Ps;Ps f   Horizontal and Vertical Position [row;column]
122                 [default: 1;1] (HVP)
123 ESC [ Ps g      Tab Clear (TBC)
124                   Ps = 0  -> Clear Current Column (default)
125                   Ps = 3  -> Clear All (TBC)
126 ESC [ Ps i      Printing
127                   Ps = 4  -> disable transparent print mode (MC4)
128 [-]               Ps = 5  -> enable transparent print mode (MC5)
129 ESC [ Pm h      Set Mode (SM)
130 ESC [ Pm l      Reset Mode (RM)
131                 Ps = 4
132                   h -> Insert Mode (SMIR)
133                   l -> Replace Mode (RMIR)
134 [-]             Ps = 20
135                   h -> Automatic Newline (LNM)
136                   l -> Normal Linefeed (LNM)
138 ESC [ Pm m      Character Attributes (SGR)
139                   Ps = 0        -> Normal (default)
140                   Ps = 1 / 22   -> On / Off     Bold    (bright fg)
141                   Ps = 4 / 24   -> On / Off     Underline
142                   Ps = 5 / 25   -> On / Off     Blink   (bright bg)
143                   Ps = 7 / 27   -> On / Off     Inverse
144                   Ps = 30 / 40  -> fg / bg      Black
145                   Ps = 31 / 41  -> fg / bg      Red
146                   Ps = 32 / 42  -> fg / bg      Green
147                   Ps = 33 / 43  -> fg / bg      Yellow
148                   Ps = 34 / 44  -> fg / bg      Blue
149                   Ps = 35 / 45  -> fg / bg      Magenta
150                   Ps = 36 / 46  -> fg / bg      Cyan
151                   Ps = 37 / 47  -> fg / bg      White
152                   Ps = 39 / 49  -> fg / bg      Default
154 ESC [ Ps n      Device Status Report (DSR)
155                   Ps = 5  -> Status Report ESC [ 0 n  (``OK'')
156                   Ps = 6  -> Report Cursor Position (CPR) [row;column]
157                         as ESC [ r ; c R
158                   Ps = 7  -> Request Display Name
159                   Ps = 8  -> Request Version Number (place in window title)
161 ESC [ Ps;Ps r   Set Scrolling Region [top;bottom]
162                 [default: full size of window] (CSR)
163 ESC [ Ps x      Request Terminal Parameters (DECREQTPARM)
165 ESC [ ? Pm h    DEC Private Mode Set (DECSET)
166 ESC [ ? Pm l    DEC Private Mode Reset (DECRST)
167 ESC [ ? Pm r    Restore previously saved DEC Private Mode Values.
168 ESC [ ? Pm s    Save DEC Private Mode Values.
169 ESC [ ? Pm t    Toggle DEC Private Mode Values (Eterm extension).
170                 Ps = 1
171                   h -> Application Cursor Keys (DECCKM)
172                   l -> Normal Cursor Keys (DECCKM)
173 [-]             Ps = 2
174                   h -> Designate USASCII for character sets G0-G3.
175                 Ps = 3
176                   h -> 132 Column Mode (DECCOLM)
177                   l -> 80 Column Mode (DECCOLM)
178 [-]             Ps = 4
179                   h -> Smooth (Slow) Scroll (DECSCLM)
180                   l -> Jump (Fast) Scroll (DECSCLM)
181                 Ps = 5
182                   h -> Reverse Video (DECSCNM)
183                   l -> Normal Video (DECSCNM)
184                 Ps = 6
185                   h -> Origin Mode (DECOM)
186                   l -> Normal Cursor Mode (DECOM)
187                 Ps = 7
188                   h -> Wraparound Mode (DECAWM)
189                   l -> No Wraparound Mode (DECAWM)
190 [-]             Ps = 8
191                   h -> Auto-repeat Keys (DECARM)
192                   l -> No Auto-repeat Keys (DECARM)
193                 Ps = 9 (X10 XTerm mouse reporting)
194                   h -> Send Mouse X & Y on button press.
195                   l -> Don't Send Mouse X & Y on button press
196                         See the section Mouse Tracking.
197 [*]             Ps = 10
198                   h -> menuBar visisble
199                   l -> menuBar invisisble
200                 Ps = 25
201                   h -> Visible cursor {cnorm/cvvis}
202                   l -> Invisible cursor {civis}
203 [*]             Ps = 30
204                   h -> scrollBar visisble
205                   l -> scrollBar invisisble
206 [*]             Ps = 35
207                   h -> Allow XTerm Shift+key sequences
208                   l -> Disallow XTerm Shift+key sequences
209 [-]             Ps = 38  -> Enter Tektronix Mode (DECTEK)
210                 Ps = 40
211                   h -> Allow 80 <--> 132 Mode
212                   l -> Disallow 80 <--> 132 Mode
213 [-]             Ps = 44
214                   h -> Turn On Margin Bell
215                   l -> Turn Off Margin Bell
216 [-]             Ps = 45
217                   h -> Reverse-wraparound Mode
218                   l -> No Reverse-wraparound Mode
219 [-]             Ps = 46
220                   h -> Start Logging (normally disabled at compile-time)
221                   l -> Stop Logging (normally disabled at compile-time)
222                 Ps = 47
223                   h -> Use Alternate Screen Buffer
224                   l -> Use Normal Screen Buffer
225                 Ps = 66
226                   h -> Application Keypad (DECPAM)
227                   l -> Normal Keypad (DECPNM)
228                 Ps = 67
229                   h -> Backspace key sends BS (DECBKM)
230                   l -> Backspace key sends DEL
231                 Ps = 1000 (X11 XTerm mouse reporting)
232                   h -> Send Mouse X & Y on button press and release.
233                         See the section Mouse Tracking.
234                   l -> Don't Send Mouse X & Y on button press and release
235 [-]             Ps = 1001 (X11 XTerm mouse tracking)
236                   h -> Use Hilite Mouse Tracking.
237                         See the section Mouse Tracking.
238                   l -> Don't Use Hilite Mouse Tracking
239 ESC ] Ps;Pt BEL
240                 Set Text Parameters
241                   Ps = 0  -> Change Icon Name and Window Title to Pt
242                   Ps = 1  -> Change Icon Name to Pt
243                   Ps = 2  -> Change Window Title to Pt
244 [*]               Ps = 10 -> menuBar command Pt (compile-time option)
245                         see menuBar section below
246 [*]               Ps = 20 -> Change default background pixmap to Pt
247                                 (compile-time option)
248                         see XPM section below
249 [*]               Ps = 39 -> Change default foreground color to Pt
250                                 (compile-time option)
251 [-]               Ps = 46 -> Change Log File to Pt (normally disabled by a
252                                 compile-time option)
253 [*]               Ps = 49 -> Change default background color to Pt
254                                 (compile-time option)
255                   Ps = 50 -> Set Font to Pt
256 [*]               special values of Pt (Eterm extension)
257                      "#+n"      change up <n> font(s)
258                      "#-n"      change down <n> font(s)
259                         if <n> is missing or 0, a value of 1 is used
260                      ""         change to font0
261                      "#n"       change to font<n>
263 ESC c           Full Reset (RIS)
264 ESC n           Invoke the G2 Character Set (LS2)
265 ESC o           Invoke the G3 Character Set (LS3)
267 --------------------------------------------------------------------------
268                                Eterm XPM
269 --------------------------------------------------------------------------
271 For the XPM XTerm escape sequence, "ESC ] 20; Pt BEL", Pt can be the
272 name of the background pixmap followed by a sequence of
273 scaling/positioning commands separated by semi-colons.
275 The scaling/positioning commands:
276         `?'             = query scale/position
277         `WxH+X+Y'       = change scale and position
278         `WxH+X'         -> Y = X
279         `WxH'           -> Y = X = 50
280         `W+X+Y'         -> H = W
281         `W+X'           -> H = W, Y = X
282         `W'             -> H = W, X = Y = 50
283         `=+X+Y'         = change position (absolute)
284         `+X+Y'          = change position (relative)
285         `=+X'           -> Y = X
286         `+X'            -> Y = X
287         `Wx0'           -> W *= W/100
288         `0xH'           -> H *= H/100
290 For example:
292         "\E]20;mona.xpm;200"
293         loads the pixmap `mona.xpm' and sets the scaling to 200%
295         "\E]20;;200;?\a"
297         sets the scaling of the current pixmap to 200% and displays
298         the image geometry in the title.
300 --------------------------------------------------------------------------
301                                Eterm menuBar
302 --------------------------------------------------------------------------
304 For the menubar XTerm escape sequence, "ESC ] 10; Pt BEL", the syntax
305 of Pt is as follows:
307         = title                         set menuBar title
308         +/                              access menuBar top level
309         -/                              remove menuBar top level
310         NUL                             remove menuBar top level
312         + [/menu/path/]submenu          add/access menu
313         - [/menu/path/]submenu          remove menu
315         + [/menu/path/]{item}[{rtext}] [action]   add/alter item
316         - [/menu/path/]{item}           remove item
318         + [/menu/path/]{-}              add separator
319         - [/menu/path/]{-}              remove separator
321         + ../                           access parent menu (1 level)
322         + ../../                        access parent menu (multiple levels)
324         Define menu quick arrows
325         <b>Begin<r>Right<l>Left<u>Up<d>Down<e>End
327 NB: the square brackets indicate optional values.
329 The title may contain the following format specifiers:
330             %%   literal '%' character
331             %v   Eterm version
333 In the `action' associated with a menu item, special characters must be
334 backslash-escaped:
335         `\a', `\b', `\E `\e', `\n', `\r', `\t', '\octal'
336 or in control-character notation:
337         ^@, ^A .. ^Z .. ^_, ^?
339         If `action' begins with a NUL (^@) character followed by
340         non-NUL characters, the leading NUL is stripped off and the
341         balance is sent back to Eterm.
343         To send a string starting with a NUL (^@) character to the
344         program, start action with a pair of NUL characters (^@^@),
345         the first of which will be stripped off and the balance
346         directed to the program.
348         As a concession and a convenience to the many Emacs work-alike
349         editors, an action string can be be starting with the following:
350                 `M-...',        eg, `M-$'       == `\E$'
351         and for Meta-x commands, a carriage-return will be appended if
352         missing and leading space will be skipped
354                 eg, `M-x apropos' == `\Exapropos\r'
356         The option {rtext} will be right-justified. In the absence of
357         a specified action, this text will be as the used. So, for
358         example,
359                 Pt = `+{Open}{^X^F}'
360         is equivalent to
361                 Pt = `+{Open){^X^F}{^X^F}'
363         To only have the right-justified text, either use the same name
364         for both left and right labels, eg:
365                 Pt = `+{Open}{Open} Open-File-Action'
366         or simply hide the left label by preceeding it with a dot, eg:
367                 Pt = `+{.anyLabel}{Open} Open-File-Action'
369         Since the left label is used for matching, it is necessary.
371         The menus also provide a hook for `quick arrows' to provide
372         easier user access.  If nothing has been explicitly set, the
373         default is to emulate the curror keys.  The syntax permits
374         each arrow to be altered individually or all four at once with
375         re-entering their common beginning/end text.  For example, to
376         explicitly associate cursor actions with the arrows, any of the
377         following forms could be used:
379                 Pt = `<u>\\E[A'
380                 Pt = `<d>\\E[B'
381                 Pt = `<r>\\E[C'
382                 Pt = `<l>\\E[D'
383         or
384                 Pt = `<u>\\E[A<d>\\E[B<r>\\E[C<l>\\E[D'
385         or
386                 Pt = `<b>\\E[<u>A<d>B<r>C<l>D'
388         It is probably easiest just to see the examples.
390 --------------------------------------------------------------------------
391                              Mouse reporting
392 --------------------------------------------------------------------------
394 ESC [ M <b> <x> <y>     report mouse position
395                         The lower 2 bits of <b> indicate the button:
396                         Button = <b> & 3 - SPACE
397                           0 = Button1 pressed
398                           1 = Button2 pressed
399                           2 = Button3 pressed
400                           3 = button released (X11 mouse report)
402                         The upper bits of <b> indicate the modifiers when
403                         the button was pressed and are added together
404                         (X11 mouse report only):
405                         State  = <b> & 28 - SPACE
406                            4 = Shift
407                            8 = Meta
408                           16 = Control
410                         Col = <x> - SPACE
411                         Row = <y> - SPACE
413 --------------------------------------------------------------------------
414                       Eterm special graphics mode:
415 --------------------------------------------------------------------------
416 ESC G Q                 query if graphics are available
417 -> ESC G 0              no graphics available
418 -> ESC G 1              graphics available (color only)
420 Add more documentation here, if anyone actually cares.
421 ESC G W <x>;<y>;<w>;<h>:        create window
422 ESC G G <id>:           query window
423 -> ESC G <id> <x> <y> <w> <h> <fw> <fh> <nw> <nh>
424 ESC G L <id>            start line
425 ESC G P <id>            start point
426 ESC G F <id>            start fill
427 ESC G C <id>            clear window
428 ESC G T <id>;<x>; <y>;<mode>;<len>:<text>       place text
430 --------------------------------------------------------------------------
431                                 Key Codes
432 --------------------------------------------------------------------------
433                 Normal          Shift           Control         Application
434 Up              ESC [ A         ESC [ a         ESC O a         ESC O A
435 Down            ESC [ B         ESC [ b         ESC O b         ESC O B
436 Right           ESC [ C         ESC [ c         ESC O c         ESC O C
437 Left            ESC [ D         ESC [ d         ESC O d         ESC O D
439                 Normal          Shift           Control
440 Tab             ^I              ESC [ Z         ^I
441 BackSpace       ^H              ^?              ^?
443                 Normal          Shift           Control         Ctrl+Shift
444 Home == Find    ESC [ 1 ~       ESC [ 1 $       ESC [ 1 ^       ESC [ 1 @
445 Insert          ESC [ 2 ~       paste-mouse     ESC [ 2 ^       ESC [ 2 @
446 Execute         ESC [ 3 ~       ESC [ 3 $       ESC [ 3 ^       ESC [ 3 @
447 End == Select   ESC [ 4 ~       ESC [ 4 $       ESC [ 4 ^       ESC [ 4 @
448 Prior           ESC [ 5 ~       scroll-up       ESC [ 5 ^       ESC [ 5 @
449 Next            ESC [ 6 ~       scroll-down     ESC [ 6 ^       ESC [ 6 @
451 Delete          ESC [ 3 ~       ESC [ 3 $       ESC [ 3 ^       ESC [ 3 @
453 Function Keys:
454 (Note: Shift + F1-10 generates F11-20)
455                 Norm            Shift           Control         Ctrl+Shift
456 F1              ESC [ 11 ~      ESC [ 23 ~      ESC [ 11 ^      ESC [ 23 ^
457 F2              ESC [ 12 ~      ESC [ 24 ~      ESC [ 12 ^      ESC [ 24 ^
458 F3              ESC [ 13 ~      ESC [ 25 ~      ESC [ 13 ^      ESC [ 25 ^
459 F4              ESC [ 14 ~      ESC [ 26 ~      ESC [ 14 ^      ESC [ 26 ^
460 F5              ESC [ 15 ~      ESC [ 28 ~      ESC [ 15 ^      ESC [ 28 ^
462 F6              ESC [ 17 ~      ESC [ 29 ~      ESC [ 17 ^      ESC [ 29 ^
463 F7              ESC [ 18 ~      ESC [ 31 ~      ESC [ 18 ^      ESC [ 31 ^
464 F8              ESC [ 19 ~      ESC [ 32 ~      ESC [ 19 ^      ESC [ 32 ^
465 F9              ESC [ 20 ~      ESC [ 33 ~      ESC [ 20 ^      ESC [ 33 ^
466 F10             ESC [ 21 ~      ESC [ 34 ~      ESC [ 21 ^      ESC [ 34 ^
468 F11             ESC [ 23 ~      ESC [ 23 $      ESC [ 23 ^      ESC [ 23 @
469 F12             ESC [ 24 ~      ESC [ 24 $      ESC [ 24 ^      ESC [ 24 @
470 F13             ESC [ 25 ~      ESC [ 25 $      ESC [ 25 ^      ESC [ 25 @
471 F14             ESC [ 26 ~      ESC [ 26 $      ESC [ 26 ^      ESC [ 26 @
473 F15 (Help)      ESC [ 28 ~      ESC [ 28 $      ESC [ 28 ^      ESC [ 28 @
474 F16 (Menu)      ESC [ 29 ~      ESC [ 29 $      ESC [ 29 ^      ESC [ 29 @
476 F17             ESC [ 31 ~      ESC [ 31 $      ESC [ 31 ^      ESC [ 31 @
477 F18             ESC [ 32 ~      ESC [ 32 $      ESC [ 32 ^      ESC [ 32 @
478 F19             ESC [ 33 ~      ESC [ 33 $      ESC [ 33 ^      ESC [ 33 @
479 F20             ESC [ 34 ~      ESC [ 34 $      ESC [ 34 ^      ESC [ 34 @
481 Keypad:
482    use Shift to temporarily override Appl-Keypad setting
483    use Num_Lock to toggle Appl-Keypad setting
484    if Num_Lock is off, escape sequences toggle Appl-Keypad setting
485 ------
486                 Normal          Application
487 KP_Enter        ^M              ESC O M
488 KP_F1           ESC O P         ESC O P
489 KP_F2           ESC O Q         ESC O Q
490 KP_F3           ESC O R         ESC O R
491 KP_F4           ESC O S         ESC O S
492 XK_KP_Multiply  *               ESC O j
493 XK_KP_Add       +               ESC O k
494 XK_KP_Separator ,               ESC O l
495 XK_KP_Subtract  -               ESC O m
496 XK_KP_Decimal   .               ESC O n
497 XK_KP_Divide    /               ESC O o
498 XK_KP_0         0               ESC O p
499 XK_KP_1         1               ESC O q
500 XK_KP_2         2               ESC O r
501 XK_KP_3         3               ESC O s
502 XK_KP_4         4               ESC O t
503 XK_KP_5         5               ESC O u
504 XK_KP_6         6               ESC O v
505 XK_KP_7         7               ESC O w
506 XK_KP_8         8               ESC O x
507 XK_KP_9         9               ESC O y
508 --------------------------------------------------------------------------