diff --git a/doc/changes.md b/doc/changes.md index 578adc3d9..796513da6 100644 --- a/doc/changes.md +++ b/doc/changes.md @@ -564,6 +564,21 @@ as part of K95 at this time, the default terminal remains VT220 for now. discarded and the remainder written to the terminal. While this behaviour was intentional, it was incorrect and doesn't match any real terminal. - Fixed rendering on large window sizes (this time for good I hope!) + - Fixed DEC UDKs being reset on soft terminal reset + - Fixed a potential buffer overflow in DECUDK processing + - Fixed DECUDK dumping the remainder of the DECUDK sequence to the terminal + when an odd number of hex digits was encountered. This behaviour was + inconsistent with the VT220, VT420 and VT520. + - Fixed null key definitions causing the remainder of a DECUDK sequence to be + dumped to the terminal. This behaviour was inconsistent with the VT220, + VT420, and VT520. Null key definitions are now ignored as per DEC STD 070. + - Fixed DECUDK not correctly ignoring certain bytes in the command string. + - Fixed DECUDK not correctly handling an empty key definition resulting in the + key being defined to garbage + - Fixed C1 control code SCI being interpreted as DECID + - Fixed APC causing all subsequent OSC, DCS and other string-type escape + sequences to be processed as APC (and so likely producing errors on the + command screen if APC is enabled) until terminal reset (K95 bug 845). ## Kermit 95 v3.0 beta 7 - 27 January 2025 diff --git a/doc/ctlseqs.xml b/doc/ctlseqs.xml index e9fec3e86..70a74b7d8 100644 --- a/doc/ctlseqs.xml +++ b/doc/ctlseqs.xml @@ -3990,27 +3990,523 @@ DECTSR 462 - DCS ; | ST + DCS ; | ST -

The first parameter can be either 0 (clear all UDK definitions before - starting, default), or 1 (erase below).

-

The second parameter can be either 0 (lock the keys, default), or 1 (do not - lock the keys)

- - +

+ Programs the response to pressing one or more of the user-defined + function keys (Shift+F1 through F20). If key definitions are + locked (SET TERM LOCK-KEY-DEFINITIONS ON, the default) + then DECUDK is ignored. You can view the current state of the + user-defined keys with SHOW UDK, and query for it with + DSR-25. +

- The third parameter is a ;-seperated list of key definitions. A key - definition consists of the key code for one of the function keys, a / character - and then the string to send in response to that function key being pressed. + While DECs hardware terminals offered a fixed amount of space + available to store all key definitions (256 bytes on the VT220, + 768 bytes on the VT420 and VT520), Kermit 95 instead currently + enforces a per-key limit of 256 bytes.

+
+

Specifies which existing key definitions should be erased. + Valid values are: +

+ +

+ Using Pe=1, you can modify only some key definitions without + having to reload all definitions. +

+
+
+

+ Specifies if key definitions should be locked upon completion + of DECDLD to prevent subsequent modification, or if they + should be left unlocked. Valid values are: +

+ +

+ If key definitions are locked (Pl=0), only the user can + unlock them again using the + SET TERM LOCK-KEY-DEFINITIONS OFF command. +

+

+ In the interests of security, host applications should not + leave key definitions unlocked. +

+
+ +
+

+ The command string portion of the DCS sequence contains zero + or more key definition strings separated by the + semicolon character (';'). Each key definition + string is of the form Kyn/Kstn where Kyn is the key + number, and Kstn is the new definition for that key. +

+ +

Note that key numbers 16, 22, 27 and 30 are skipped. Valid + key numbers are: +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Key number (Kyn)KeyNotes
11F1VT420 or higher
12F2VT420 or higher
13F3VT420 or higher
14F4VT420 or higher
15F5VT420 or higher
17F6
18F7
19F8
20F9
21F10
23F11Shift+Alt+F1 on keyboards with 12 function keys.
24F12Shift+Alt+F2 on keyboards with 12 function keys.
25F13Shift+Alt+F3 on keyboards with 12 function keys.
26F14Shift+Alt+F4 on keyboards with 12 function keys.
28F15The HELP key on an LK450 keyboard. Shift+Alt+F5 on keyboards with 12 function keys.
29F16The DO key on an LK450 keyboard. Shift+Alt+F6 on keyboards with 12 function keys.
31F17Shift+Alt+F7 on keyboards with 12 function keys.
32F18Shift+Alt+F8 on keyboards with 12 function keys.
33F19Shift+Alt+F9 on keyboards with 12 function keys.
34F20Shift+Alt+F10 on keyboards with 12 function keys.
+ +

+ The key definition (Kstn) is written as a sequence of hex + digit pairs, which are the charactes in the following + ranges: +

+ +

+ Each pair of hex digits represents a single 8-bit byte. + For example the hex digits 4B represent the letter + K. The digits 4B65726D697420393521 represent the + string Kermit 95!. This string could be bound to + Shift+F6 with the DCS sequence + DCS0;1|18/4B65726D697420393521ST + which would erase all key definitions, assign the string to + key 18 (F7), then finish leaving key definitions unlocked. +

+

+ If a key definition contains an uneven number of hex digits + this is an error, and Kermit 95 will ignore the final hex + digit in keeping with the DEC terminals it emulates. +

+

+ The characters HT (TAB), LF, VT, FF and CR can be included + in the key definition string for formatting purposes (they + are ignored when DECUDK is processed). +

+

+ Kermits 95s \fhexify function may be useful for + converting strings to hex format. For example, typing + echo \fhexify(Hello!) at the K95 prompt will output + 48656C6C6F21 which you can then use with DECUDK. + The reverse of this function, \funhexify, is also + available if you wish to decode key definitions. +

+

+ As a final example, you could bind the string "Hello, " to + Shift+F6 and "Kermit 95!" to Shift=F7 with the following + DCS sequence: + DCS0;1|17/48656C6C6F2C20;18/4B65726D697420393521ST +

+
+
+

+ The DECUDK specification leaves some behaviour undefined. + Where possible, Kermit 95 attempts to match the behaviour of + the DEC products it emulates regardless, though at the time + this was feature was last updated only a VT220, VT420 and + VT520 were available for testing. Kermit 95s other terminal + emulations may not exactly match their respective terminals. +

+

+ The following bytes have behaviours undefined by the DECUDK + specification, and so kermit 95 assigns them meaning as + described: +

+
+
0x00 through 0x17, 0x19, 0x1C through 0x2E, 0x3A, + 0x3C through 0x40, 0x47 through 0x60, 0x67 through 0x7F, + 0x80 (VT220 only), 0xA0 through 0xAF, 0xBA through 0xC0, + 0xC7 through 0xE0, 0xE7 through 0xFF +
+
Ignored
+ +
0xB0 through 0xB9
+
Treated as 0x30 through 0x39 (the digits 0...9)
+ +
0xC1 through 0xC6
+
Treated as 0x41 through 0xF6 (the digits A...F)
+ +
0xE1 through 0xE6
+
Treated as 0x61 through 0x66 (the digits a...f)
+ +
0x18, 0x1A, 0x1B, 0x80 (VT320+), 0x81 through 0x9F
+
Aborts the DECUDK sequence; the byte and remainder of + the DECUDK sequence will be processed as normal input + potentially being dumped to the terminal. SUB (0x1A) + will print a reverse question mark, IND (0x84) and NEL + (0x85) will go down a line, etc. +
+
+ +
+
-

K95 does not currently - support specifying the shift-state of function keys, or the direction the - response to pressing the key is to be sent in.

+

+ While Kermit 95 supports some features of DECUDK as it + exists on the VT420 and VT500 such as being able to program + F1 through F5, it does not currently support specifying + the modifier keys or direction the keys response should be + sent in. These features will arrive in some future release + that includes VT420 emulation. +

@@ -6147,8 +6643,8 @@ VT420: indicates if the protected attribute is set
  • Sflag is a single byte in the ASCII range where bit 1 indicates DECOM is set, - bit 2 indicates SS2 is pending, - bit 3 indicates SS3 is pending, + bit 2 indicates SS2 is pending, + bit 3 indicates SS3 is pending, and bit 4 indicates the last column flag is set.
  • Spgl is a number from 0 to 3 indicating which of G0, G1, G2 or G3 is invoked into GL
  • diff --git a/doc/keyb.xml b/doc/keyb.xml index 43a3cd0b8..dcd66e05b 100644 --- a/doc/keyb.xml +++ b/doc/keyb.xml @@ -1067,8 +1067,7 @@ this document to HTML isn't quite as strict, and the DTD is not comprehensive. Shift-F1 \880 - \Kudkf1 - \{27}[1\{59}2P + \Kudkf1 \Ksni_s_f01 \Kansif13 @@ -1080,8 +1079,7 @@ this document to HTML isn't quite as strict, and the DTD is not comprehensive. Shift-F2 \881 - \Kudkf2 - \{27}[1\{59}2Q + \Kudkf2 \Ksni_s_f02 \Kansif14 @@ -1093,8 +1091,7 @@ this document to HTML isn't quite as strict, and the DTD is not comprehensive. Shift-F3 \882 - \Kudkf3 - \{27}[1\{59}2R + \Kudkf3 \Ksni_s_f03 \Kansif15 @@ -1106,8 +1103,7 @@ this document to HTML isn't quite as strict, and the DTD is not comprehensive. Shift-F4 \883 - \Kudkf4 - \{27}[1\{59}2S + \Kudkf4 \Ksni_s_f04 \Kansif16 @@ -1119,8 +1115,7 @@ this document to HTML isn't quite as strict, and the DTD is not comprehensive. Shift-F5 \884 - \Kudkf5 - \{27}[15\{59}2~ + \Kudkf5 \Ksni_s_f05 \Kansif17 @@ -1132,8 +1127,7 @@ this document to HTML isn't quite as strict, and the DTD is not comprehensive. Shift-F6 \885 - \Kudkf6 - \{27}[17\{59}2~ + \Kudkf6 \Ksni_s_f06 \Kansif18 @@ -1145,8 +1139,7 @@ this document to HTML isn't quite as strict, and the DTD is not comprehensive. Shift-F7 \886 - \Kudkf7 - \{27}[18\{59}2~ + \Kudkf7 \Ksni_s_f07 \Kansif19 @@ -1158,8 +1151,7 @@ this document to HTML isn't quite as strict, and the DTD is not comprehensive. Shift-F8 \887 - \Kudkf8 - \{27}[19\{59}2~ + \Kudkf8 \Ksni_s_f08 \Kansif20 @@ -1171,8 +1163,7 @@ this document to HTML isn't quite as strict, and the DTD is not comprehensive. Shift-F9 \888 - \Kudkf9 - \{27}[20\{59}2~ + \Kudkf9 \Ksni_s_f09 \Kansif21 @@ -1184,8 +1175,7 @@ this document to HTML isn't quite as strict, and the DTD is not comprehensive. Shift-F10 \889 - \Kudkf10 - \{27}[21\{59}2~ + \Kudkf10 \Ksni_s_f10 \Kansif22 @@ -2485,8 +2475,7 @@ this document to HTML isn't quite as strict, and the DTD is not comprehensive. Alt-Shift-F1 \2928 - \Kudkf11 - \{27}[1\{59}4P + \Kudkf11 \Ksni_c_f01 @@ -2497,8 +2486,7 @@ this document to HTML isn't quite as strict, and the DTD is not comprehensive. Alt-Shift-F2 \2929 - \Kudkf12 - \{27}[1\{59}4Q + \Kudkf12 \Ksni_c_f02 @@ -2509,8 +2497,7 @@ this document to HTML isn't quite as strict, and the DTD is not comprehensive. Alt-Shift-F3 \2930 - \Kudkf13 - \{27}[1\{59}4R + \Kudkf13 \Ksni_c_f03 @@ -2521,8 +2508,7 @@ this document to HTML isn't quite as strict, and the DTD is not comprehensive. Alt-Shift-F4 \2931 - \Kudkf14 - \{27}[1\{59}4S + \Kudkf14 \Ksni_c_f04 @@ -2533,8 +2519,7 @@ this document to HTML isn't quite as strict, and the DTD is not comprehensive. Alt-Shift-F5 \2932 - \Kudkf15 - \{27}[15\{59}4~ + \Kudkf15 \Ksni_c_f05 @@ -2545,8 +2530,7 @@ this document to HTML isn't quite as strict, and the DTD is not comprehensive. Alt-Shift-F6 \2933 - \Kudkdo - \{27}[17\{59}4~ + \Kudkdo \Ksni_c_f06 @@ -2557,8 +2541,7 @@ this document to HTML isn't quite as strict, and the DTD is not comprehensive. Alt-Shift-F7 \2934 - \Kudkf17 - \{27}[18\{59}4~ + \Kudkf17 \Ksni_c_f07 @@ -2569,8 +2552,7 @@ this document to HTML isn't quite as strict, and the DTD is not comprehensive. Alt-Shift-F8 \2935 - \Kudkf18 - \{27}[19\{59}4~ + \Kudkf18 \Ksni_c_f08 @@ -2581,8 +2563,7 @@ this document to HTML isn't quite as strict, and the DTD is not comprehensive. Alt-Shift-F9 \2936 - \Kudkf19 - \{27}[20\{59}4~ + \Kudkf19 \Ksni_c_f09 @@ -2593,8 +2574,7 @@ this document to HTML isn't quite as strict, and the DTD is not comprehensive. Alt-Shift-F10 \2937 - \Kudkf20 - \{27}[21\{59}4~ + \Kudkf20 \Ksni_c_f10 diff --git a/doc/manual/k95bugs.html b/doc/manual/k95bugs.html index cbc8a72f6..2b9c0ad97 100644 --- a/doc/manual/k95bugs.html +++ b/doc/manual/k95bugs.html @@ -1017,6 +1017,7 @@

    BUG LIST

  • [+] (K) 842. Japanese-roman character set does not work
  • [+] (K) 843. SGR font attributes do not turn off if the reverse video attribute is set
  • [+] (K) 844. Cursor positioning on double-width lines in K95G +
  • [+] (K) 845. APC causes subsequent string escape sequences (DCS, OSC, etc) to be interpreted as APC @@ -8231,6 +8232,22 @@

    844. Cursor positioning on double-width lines in K95G

    This is also logged as Issue #561 on Github +

    845. APC causes subsequent string escape sequences (DCS, OSC, etc) to be interpreted as APC

    +

    + When K95 receives an APC escape sequence it fails to clear the APC flag + whether or not the APC sequence is processed. This causes subsequent OSC, + DCS and other string-type control sequences to be interprted as APC instead + of their correct type until the terminal is reset. If APC is enabled, using + an OSC (like setting the title) or DCS (like setting user-defined keys) may + cause errors to appear on the command screen. +

    +

    + This affects all releases of Kermit 95 since at least 1.1.11 (February + 1997). Older releases were not available for testing, but its possible the + bug may have been introduced as early as 1.1.7 (July 1996). It is fixed in + K95 3.0.0 beta 8. +

    +