* KEDIT 5.0 key macros based on INITIAL.KML for german keyboards. * To load these definitions on top of INITIAL.KML use something * like the following scheme: * in PROFILE.KEX: if initial() then 'macro initial' * in INITIAL.KEX: 'define INITIAL.KML' ; 'define GERMAN.KML' * Don't forget to define GERMAN.KML after redefining INITIAL.KML. * Of course it's much simpler to use only one INITIAL.KML for all * keys, but I often test different configurations and wanted to * separate KEYB GR stuff from more generally useful definitions. ::: * Macro :: introduced by ::: in column 1 is used throughout all * following key definitions to keep comments apart from actual * key macros. With this trick only the code is kept in memory, * comments automagically "redefine" each other, and a final ::: * results in a harmless 'define :: nop' macro. KeditW offers a * new ::* KML-comment-line-intro for (almost) the same purpose. ::: * For "key (number) n" read "scan code n" in the following text: * On an obsolete keyboard with 83 keys the real key numbers 1..83 * correspond to scan codes 1..83. To simplify debugging of keys * defined here (GERMAN.KML) its number and its KEYB GR label are * shown by a DMSG (debug message). See also KHELP READV and the * related topics like LASTKEY for more infos on Kedit key numbers. ::: * Key 86 exists only on keyboards with 102 keys, the combination * of (left) Alt + key 86 does not work. But on KEYB GR pressing * (right) AltGr + key 86 results in "|", and Kedit READV reports * it as key 86 s-\ 'text |' correctly. Often combinations like * Alt + key 15 result in hex. 0E00 (hex. 0E = 15), but hex. 5600 * (hex. 56 = 86) is already used for s-F3 (shifted F3). ::: * Although hex. 0C00 (resp. 0D00) for Alt + key 12 (resp. 13) is * apparently not used for another combination, Alt + key 12 (13) * results in hex. 8200 (8300). READV reports it as key 130 (131) * correctly (hex. 82 = 130), but the debug message defined below * shows the original scan code 12 (13) for Alt + key 12 (13). ::: * The shifted key 4 on KEYB GR is either recognized as C-U if the * actual codepage is 437, or READV "unidentifies" it as ASCII 245 * if the actual codepage is 850. Similarly all composed keys are * "unidentified" with MACRO ASCII nnn using the following method: * If in hex. kkcc (key hex. kk) ASCII hex. cc is not zero and no * known KEYB US label, then ASCII nnn (hex. cc = nnn) inserts its * unmodified text (see QUERY MACRO ASCII). Composed keys in this * sense are accented (or umlauted) ASCII codes and of course all * Alt-keypad combinations: Alt-2-2-4 "" is a typical test case, * OS/2 REXX SYSGETKEY and PC DOS REXX RXGETKEY don't support it, * but READV recognizes ASCII 224. The inconsistency for shifted * key 4 on KEYB GR depending on the codepage is no Kedit bug, but * a desirable keyboard device behaviour: Codepage 437 has only * ASCII 21 with a graphical representation corresponding to the * label of key 4 on KEYB GR, but in codepage 850 ASCII 245 has * the same graphical representation. ASCII 21 = NAK is used in * some communication protocols (NAK = Negative AcKnowledge). ::: * Kedit recognizes keypad 0 .. 9, /, *, -, +, and . (point), and * so it's possible to define e.g. macro MINUS keeping the normal * macro -. Kedit's "keypad detector" fails for S-DEL on KEYB GR, * hex. 532C instead of 532E (53 = key 83, 2C = comma, 2E = point). * Kedit recognizes 532C as , (comma) instead of S-DEL. A simple * modification of macro , can "revive" KEYB GR S-DEL (see below). ::: * Kedit 5.0 READV reports scan code 0 for all composed characters * like '+u= or [Alt]+keypad combinations. KeditW READV reports * the last key (e.g. 22 U for ) or left Alt 56 for [Alt]+keypad. * READV.1 or the similar LASTKEY.1() is ASCII nnn for composed * characters, otherwise it's the name of the corresponding macro. * READV.3 or the similar LASTKEY.3() is 224 for SLASH, NUMENTER, * and C-NUMENTER, this is actually a BIOS feature. ::: * Kedit 5.0 ignores C-PrtSc (114), C-Star (150), and A-Star (55). * It's possible to patch the table entry for STAR in the binary, * then C-PrtSc is recognized as S-STAR, C-STAR and A-STAR work * as expected, and a shifted key 55 is still recognized as STAR. * The hex. codes are 7200 S-STAR, 9600 C-STAR, and 3700 A-STAR. ::: * Kedit treats 9 resp. 11 KEYB GR characters as composed like : * label * ASCII 132 142 148 153 129 154 225 248 253 252 230 239 245 200 * key 40 40 39 39 26 26 12 41 3 4 50 13 4 22 * (a-: right AltGr, 850: codepage 850) a-2 a-3 a-M 850 850 '+u ::: * An additional AltGr combination a-e was introduced to support * the Euro-symbol (ASCII 213 ) in codepage 850. This depends on * the installed OS/2 version (e.g. Warp 3 fixpack 40 has Euro). ::: * Twenty KEYB GR labels are different (not counting swapped Y and Z): * key 3 4 7 8 9 10 11 12 13 26 27 39 40 41 43 51 52 53 86 83 * s-US @ # ^ & * ( ) - + { } : " ~ | < > ? . * US 2 3 6 7 8 9 0 _ = [ ] ; ' ' \ , . / DEL * s-GR " & / ( ) = ? ` * ' ; : _ > , * GR 2 3 6 7 8 9 0 ' + ^ # , . - < DEL * AltGr { [ ] } \ ~ | ::: * Three control key differences: vvv vvv vvv * Kedit macro C-2 C-A .. C-Z C-[ C-\ C-] C-6 C-- * KEYB US label @ 2 a A .. z Z { [ | \ } ] ^ 6 _ - * KEYB GR label " 2 a A .. z Z ' # * + & 6 _ - * decimal ASCII 0 1 .. 26 27 28 29 30 31 ::: * --- undefined keys -------------------------------------------------- * The default macros A-', A-;, A-[, and A-/ are undefined (NOP), here * unusual KEYB GR numbers and labels are documented by debug messages. * They still do nothing (NOP) if not debugged, but QUERY MACRO A-[ or * similar commands show the DMSG. The default macros A-, and A-. are * also undefined (NOP), but their label is less unusual containing at * least the comma resp. point on KEYB GR (same numbers as on KEYB US). :A-[ 'dmsg KEYB GR 26: ' :A-; 'dmsg KEYB GR 39: ' :A-' 'dmsg KEYB GR 40: A' :A-, 'dmsg KEYB GR 51: ,;' :A-. 'dmsg KEYB GR 52: .:' :A-/ 'dmsg KEYB GR 53: -_' ::: * --- control keys ---------------------------------------------------- * The default macros C-[, C-], C-\, and C-U are undefined (NOP), here * unusual KEYB GR numbers and labels are documented by debug messages. * Like C-2 and C-U defined in INITIAL.KML macro ASCII nnn is used to * define the corresponding ASCII character. C-U is (re)defined here * adding a DMSG for key 4 on KEYB GR codepage 437. Control + U also * results in C-U, but READV then correctly reports key 22 instead of * key 4 (keyboards BG241 or TR440 probably use other C-U key numbers). :C-U 'macro ascii 21' if lastkey.3() = 4 then 'dmsg KEYB GR 4: 3' || d2c(21) :C-[ 'macro ascii 27' ; 'dmsg KEYB GR 26: ' :C-\ 'macro ascii 28' ; "dmsg KEYB GR 43: #'" :C-] 'macro ascii 29' ; 'dmsg KEYB GR 27: +* ~' ::: * --- AltGr keys ------------------------------------------------------ * With KEYB GR left Alt differs from right AltGr in 12 cases. Kedit * allows to get rid of these differences except from key 86 (AltGr |). * This affects the defaults for A-2, A-3, and A-M. With XPOINT-keys * A-1 .. A-6 to lose A-2 and A-3 is no problem, it is still one more * XPOINT than Kedit's default A-1 .. A-3. But A-M (Move block) has * to be replaced by some other key, here A-T (mnemonic: block Target) * is used. The default macros C-Q, A-Q, A-T, A-7, A-8, A-9, A-0, A--, * A-E, and A-] are undefined (NOP). * OS/2 3.x KwikInf supports A-Q, C-Q, and other hot keys. Therefore * A-Q is defined to be compatible with AltGr + Q, and C-Q is reserved * for KwikInf instead of A-Q. Not yet implemented: For native DOS * replace the dummy C-Q debug message by some usage of QuickHelp (QH). * Actually KwikInf inherited A-Q from MS OS/2 1.x QuickHelp (yes: MS). :A-2 'text ' ; 'dmsg KEYB GR 3: 2" ' :A-3 'text ' ; 'dmsg KEYB GR 4: 3 ' :A-7 'macro S-[' ; 'dmsg KEYB GR 8: 7/ {' :A-8 'macro [' ; 'dmsg KEYB GR 9: 8( [' :A-9 'macro ]' ; 'dmsg KEYB GR 10: 9) ]' :A-0 'macro S-]' ; 'dmsg KEYB GR 11: 0= }' :A-- 'macro \' ; 'dmsg KEYB GR 12: ? \' :A-E 'text ' ; 'dmsg KEYB GR 18: eE [CP 850 Euro]' :A-Q 'macro S-2' ; 'dmsg KEYB GR 16: qQ @' :C-Q 'dmsg C-Q reserved for OS/2 KwikInf instead of A-Q' :A-] 'macro S-`' ; 'dmsg KEYB GR 27: +* ~' :A-M 'text ' ; 'dmsg KEYB GR 50: mM ' :A-T 'mov block' ; if rc = 0 then 'reset block' ::: * --- dead keys ------------------------------------------------------- * KEYB GR has 3 "dead" keys used to compose accented characters, e.g. * pressing '+u results in . To get the accent character alone it's * necessary to "compose" it with a SPACE. To simplify the input of * accents three corresponding Alt-keys are redefined: * Alt + key 41 (label ^ on KEYB GR) recognized as A-` key 41. * Alt + key 43 (label #' on KEYB GR) recognized as A-\ key 43. * Alt + key 13 (label '` on KEYB GR) recognized as A-= key 131. * Losing the default A-= key definition DUP is no problem, its label * is no mnemonic = on KEYB GR and the default F8 is another DUP-key. * * A bug in OS/2 KEYBOARD.DCP (1995) KEYB GR "unsupports" A-` key 41, * it is mapped to hex. 8300 (131, key 13, like accents 1 ' and 2 `), * and this wrong mapping is disabled in the key 41 definition. To * revive A-` patch two 5E0D0000008361836588 => 5E290000002961836588 * and two 0B0003F8000000 => 0B0003F8000003 below KEYB strings "129". * BTW: this bug still exists in WARP 3 fixpack 40 KEYBOARD.DCP, but * the 5E29 stuff is already okay, so patch only 0B0003F8000003. :A-` 'macro S-6' ; 'dmsg KEYB GR 41: ^' :A-\ "macro '" ; "dmsg KEYB GR 43: #'" :A-= 'macro `' ; "dmsg KEYB GR 13: '`" ::: * --- other keys ------------------------------------------------------ * The default SLASH definition 'text /' reflects its label on KEYB US, * but on KEYB GR 'text ' would correspond to its label. INITIAL.KML * redefines SLASH for another purpose, but A-SLASH is available (NOP) * for 'text ' generating ASCII character 246. * To support redefinitions of S-DEL in other macros, macro , (comma) * corrects Kedit's mismatch of key 83 by executing S-DEL if necessary. * PURGE S-DEL can restore Kedit's default macro S-DEL 'text .' point. :A-Slash 'text ' ; 'dmsg KEYB GR 164: ' :S-Del 'text ,' ; 'dmsg KEYB GR 83: ,' :, if lastkey.3() = 83 then 'macro S-Del' ; else 'text' lastkey.2() ::: * --- help keys ------------------------------------------------------- * INITIAL.KML defines C-F3 .. C-F10 as a set of help keys describing * its key definitions, some of these macros should be redefined here: :C-F8 'dmsg GERMAN.KML redefined C-F8 infos on A-2, A-3, A-E, A-Q, A-T, and A-=' if dir() > arg() then do ; 'macro C-F10 Path Name Ext' ; exit rc ; end say 'A-A Altered A=K Keep copy A=S Split align A-Y Yank box ' say 'A-E Euro "" A-N Netscape A=T move Target A=Z mark stream' say 'A-H Help keys A-P Pref on/off A=V View block ' say 'A-I lAtIn to 850 A=R Recover A=W del. Word A-1 point .A-1 ' say 'A=J Join align A-Star nop A-X Xedit dir. A-4..6 like A-1' :C-F10 'dmsg GERMAN.KML redefined INITIAL.KML C-F10 infos on KEYB GR keys' if dir() & arg( 1 ) <> '.' then do 'point .C-F' if arg() = 0 then 'macro C-F11' . else if arg( 1 ) <> 'OFF' then 'dirsort' arg( 1 ) ; else 'q defsort' 'locate .C-F point .C-F off' ; exit rc end X = '"''"' ; XX = "A-':" say 'C-2: NUL C-\: FS A-\:' X ' A-2: "" A-3: "" A-Slash "" ' say 'C-U: NAK C-]: GS A-]: "~" A-7: "{" A-0: "}" A-Enter = C-Enter' say 'C-Tab: HT C-[: ESC A-[: nop A-8: "[" A-9: "]" C-Slash = A-Slash' say 'A-.: nop A-;: nop A--: "\" A-Q: "@" A-=: "`" C-Center= Center ' say 'A-,: nop ' XX 'nop A-/: nop A-M: "" A-`: "^" C-Star = A-Star ' :::