100 REMark IBM to QL keyboard configuration program
105 REMark Sweden
110 :
112 DEFine PROCedure drive
113 fpre$='ipcextsw_'
115 dv$='flp1_'
116 prog$='kbd_Swedish_bas'
117 END DEFine drive
118 drive:MODE 4
119 CLS:PRINT"If you do not have a Minerva"\"rom and the keyboard program"\"doesn't run, type RUN"
120 MERGE dv$&'kbdgen_bas'
6000 REMark QL keyboard and controls
6010 DATA '71 F1','+.5','63 @ ESC'
6020 DATA '33 ! 1','11 " 2','31 # 3','76 $ 4','72 % 5','12 & 6','77 / 7','10 ( 8'
6030 DATA '20 ) 9','15 = 0','25 ? +',"45 [ '",'55 ] |','65 > <','+.25'
6040 DATA 'C2 X','C4 =+S =+C','C5 ACS','+.25','C3 X','C6 U/S','C7 Num'
6050 DATA '73 F2','+.5','23w1.5 TABU LATE'
6060 DATA '13 Q','21 W','14 E','24 R','16 T','26 Y','17 U','22 I','27 O','35 P'
6070 DATA '40 ','50 ^ *','drw0','t','+.75'
6080 DATA 'F0 =A','E0 =C','D0 =S','+.25','F1 S-N =A','E1 S-N =C','D1 S-N =S'
6090 DATA '74 F3','+.5','41w1.75 CAPS LOCK'
6100 DATA '34 A','43 S','36 D','44 F','46 G','32 H','37 J','42 K','30 L'
6110 DATA '47 ','57 ','drw0','drw0','60w1.75 ENTER','+.75'
6120 DATA 'F6 +A','E6 +C','D6 +S','+.25','F7 S-N +A','E7 S-N +C','D7 S-N +S'
6130 DATA '70 F4','+.5','B4w2.25 SHIFT','dlw0'
6140 DATA '51 Z','03 X','53 C','04 V','54 B','06 N','56 M'
6150 DATA '07 ; ,','52 : .','05 _ -','drurw0','drurw0','00w2.25 SHIFT','+.75'
6160 DATA 'F4 -A','E4 -C','D4 -S','+.25','F5 S-N -A','E5 S-N -C','D5 S-N -S'
6170 DATA '75 F5','+.5','01w1.75 CTRL','dlulw0','61 /__ \  ','64 __\   /'
6180 DATA 'drurw0','drurw0','drurw0','66w7   ','dlulw0','dlulw0','dlulw0'
6190 DATA '62 /\ |','67 | \/','drurw0','02w1.75 ALT','+.75'
6200 DATA 'F2 ~A','E2 ~C','D2 ~S','+.25','F3 S-N ~A','E3 S-N ~C','D3 S-N ~S'
6210 :
7000 REMark IBM keyboard
7010 DATA '08 Esc','urdr','07 F1','0F F2','17 F3','1F F4'
7020 DATA 'urw.5','27 F5','2F F6','37 F7','3F F8','+.5'
7030 DATA '47 F9','4F F10','56 F11','5E F12','+.5'
7040 DATA '57 Prt Sys','5F Scr Lck','62 Pse Brk','+.5'
7050 DATA '9F ???','A0 Get','A1 Put','9E End'
7060 DATA '0E xxx '
7070 DATA '16 ! 1','1E " 2@','26 # 3`','25  4$','2E % 5','36 & 6','3D / 7{','3E ( 8['
7080 DATA '46 ) 9]','45 = 0}','4E ? +\','55  xxx','drw0','66w2 <--','+.5'
7090 DATA '67 Ins ert','6E Hme','6F Pge Up','+.5'
7100 DATA '76 Num Lck','77 /','7E *','84 -'
7110 DATA '0Dw1.5 |<-- -->|'
7120 DATA '15 Q','1D W','24 E','2D R','2C T','35 Y','3C U','43 I','44 O','4D P'
7130 DATA '54 ','5B ^ "~','w0','tw1.5','+.5'
7140 DATA '64 Del ete','6++5 End','6D Pge Dwn','+.5'
7150 DATA '6C 7 Hme','75 8 ','7D 9 PgU','t'
7160 DATA '14w1.75 Caps Lock'
7170 DATA '1C A','1B S','23 D','2B F','34 G','33 H','3B J','42 K','4B L'
7180 DATA '4C ','52 ',"53 * '",'w0','5Aw1.25 <-'&"'",'+.5'
7190 DATA '','','','+.5'
7200 DATA '6B 4 ','73 5  ','74 6 ','7C +'
7210 DATA '12w1.25 /\ ||','13 > <|'
7220 DATA '1A Z','22 X','21 C','2A V','32 B','31 N','3A M'
7230 DATA '41 ; ,','49 : .','4A _ -','drw0','drw0','59w2.75 /\ ||','+.5'
7240 DATA '','63 ','','+.5'
7250 DATA '69 1 End','72 2 ','7A 3 PgD','t'
7260 DATA '11w1.5 Ctrl','dl','drw0','19w1.5 Alt'
7270 DATA 'drw0','drw0','drw0','29w7   ','dlw0','dlw0','dlw0'
7280 DATA '39w1.5 AltGr','drw0','dr','58w1.5 Ctrl','+.5'
7290 DATA '61 ','60 ','6A ','+.5'
7300 DATA '70w2 0 Ins','dlw0','71 . Del','79 Ent'
7310 :
8000 REMark Default translation data
8010 DATA '+S70','','75','74','71','73','71'
8020 DATA '63','+S75','+S74','+S71','70','23','+C25US+C+S04','73'
8030 DATA '','LC','LS','65','41','13','33','74'
8040 DATA '','LA','51','43','34','21','+S11US11','70'
8050 DATA '','53','03','36','14','~C+S21US76','31','75'
8060 DATA '','66','04','44','16','24','72','+S71'
8070 DATA '','06','54','32','46','26','12','+S73'
8080 DATA '','RA','56','37','17','77','10','+S74'
8090 DATA '','07','42','22','27','15','20','+S70'
8100 DATA '','52','05','30','47','35','25','+S75'
8110 DATA '','+S05','57','50US45','40','~C+S57US55','+C71','+C53'
8120 DATA 'RC','RS','60','+S50US+S76','+S55US+S31','+S55US+S31','+C73','+C75'
8130 DATA '67','61','+C66','62','+C64','+A64','+C61','+C-S70'
8140 DATA '','+A64NL33','64','61NL76','+A61NL77','+A+S67','+A61','+A+S62'
8150 DATA '+C-S70NL15','+C64NL52','67NL11','00NL72','64NL12','62NL10','RN','+S77'
8160 DATA '','60','+A+S67NL31','+S45','-S25','+A+S62NL20','-S50',''
8170 DATA '','','','+S73','-S05'
8180 :
9000 REMark Help data format
9010 REMark At each call of the help routine, data items are read and
9020 REMark concatenated until the final character is not a "\" or space.
9030 REMark Wherever there is a "\", a line break is forced.
9040 REMark The rest of the string is split into 80 character maximum
9050 REMark chunks at spaces.
9060 REMark At the end of all that, there should be four lines to print,
9070 REMark with the last leaving room for the "F1: more".
9080 REMark The end of the help data is marked with a null string.
9090 :
9100 REMark QL/control/IBM data format
9110 REMark This enables the screen to be drawn, and sets up internal
9120 REMark  codes for each box.
9130 REMark Generally, there is precisely one data item per element of a
9140 REMark  22 column by 11 row grid.
9150 REMark In order to leave horizontal gaps, an extra data item with a
9160 REMark  "+" prefix is used.
9170 REMark All other items describe elements of the grid.
9180 REMark Items that describe real boxes contain at least one space and
9190 REMark  start with a two digit code.
9200 REMark Items that are "place holders" for elements of the grid have a
9210 REMark  "navigation" prefix.
9220 REMark The navigation prefix is 0..4 pairs of characters saying that,
9230 REMark  when the cursor gets here travelling in a given direction,
9240 REMark  which way to go next.
9250 REMark By default, the prefix is taken to read "llrruudd", i.e.
9260 REMark  travel straight through.
9270 REMark For tall keys, the element corresponding to the top part of
9280 REMark  the key has a "t".
9290 REMark For elements whose width is not standard, a number prefixed
9300 REMark  with "w" says how wide.
9310 REMark For the "real" items, the two digit code is interpretted in a
9320 REMark  funny old way:
9330 REMark For the first five rows, it is essentially the QL scan code.
9340 REMark The control box codes are wierd, and have a hex first digit!
9350 REMark The left QL "SHIFT" key is also recognised by a special code.
9360 REMark The remaining six rows are read as hex, and give the IBM MF3
9370 REMark  scan codes direct, or a control.
9380 REMark After the first space in a "real" item, there is the single,
9390 REMark  or upper, text to show on the key.
9400 REMark If there is another space, the text following that will be
9410 REMark  shown as the lower text.
9420 :
9430 REMark Default translation data
9440 REMark This gives the key efeect for each MF3 scan code in sequence.
9450 REMark Generally it is any shift adjustments and the QL scan code.
9460 REMark Shift adjustments are +, - or ~ with A, C or S.
9470 REMark "Complex" translations have a second code after "US" or "NL".
9480 REMark The second code is the unSHIFTed, unNumLocked effect.
9490 REMark For keys that are to be ignored, the QL code is zero.
9500 REMark I.e. for the numeric keypad 5, the second QL code is zero.
9510 REMark The IBM shift keys are shown as LA/LC/LS/RA/RC/RS.
9520 REMark The NumLock is also special, and is shown as RN.
9530 REMark Undefined MF3 codes are given as a null string.
9540 :
20010 DEFine PROCedure aa
20015 drive
20020 DELETE dv$&prog$
20030 SAVE dv$&prog$
20040 END DEFine aa
