c Thai Keyboard for Tavultesoft Keyboard Manager 3.0 c Keyboard: Thai language for use with UPC font coding and WTT2 vigorous c checking NAME "Thai UPC Strict" VERSION 3.0 BITMAPS ThaiKey1 ThaiKey0 HOTKEY "^+T" c where ThaiKey1 is the name of the Keyboard-On .bmp (bitmap) file, c ThaiKeyO is the name of the Keyboard-Off .bmp file c and Ctrl+Shift+T is the "hotkey" combination to enable the keyboard. c This control file provides a strict WTT2.0 vigorous keyboard coding and c checking, and thus is only really suited to the Thai language. c Some rules are included, commented out. These give the full precise c definition regardless of sort order as much as possible in TAPIC terms. c Other rules are used to take advantage of rule ordering to reduce the c number of rules drastically. (50 rules instead of 86 + 138 + 90) c Tone vowel reordering is not part of WTT2 but the rules are included but c commented. They may be uncommented if tone vowel reordering is wanted. c Multi-key sequences are not defined in WTT2, they have been arbitrarily c assigned here. begin > use(Main) c WTT2 Class 2 - NON store(NONK) "Q@#$%*()_+" "W" "XZ3}2MO&Q" '"' store(NON) "" '"' ")(-,/?" "." "" d144 d128 c last three codes are multi-key c tall consonants which move things left store(CtallK) "x/a" store(Ctall) "" c long consonants which move under things down store(ClongK) "PDE{" store(Clong) "" c d161-d206 normal consonants store(CK) "d-\8|S'0C=:GRvV" store(C) "" c WTT2 Class 3 - CONS all 44 of them store(CONSK) outs(CK) outs(CtallK) outs(ClongK) store(CONS) outs(C) outs(Ctall) outs(Clong) c WTT2 Class 4 - LV prevowels store(LVK) "gcF.w" store(LV) "" c d224-d228 c WTT2 Class 5 - FV1 sara a?, sara aa, sara am store(FV1K) "tke" store(FV1) d208 d210 d211 c WTT2 Class 6 - FV2 lakkhangyao store(FV2K) "1" store(FV2) d229 c WTT2 Class 7 - FV3 ligature vowels store(FV3K) "A?" store(FV3) "" c WTT2 Class 8 - BV1 sara u? store(BV1K) "6" store(BV1) d216 store(BV1l) d232 c WTT2 Class 9 - BV2 sara uu store(BV2K) "^" store(BV2) d217 store(BV2l) d233 c WTT2 Class 10 - BD phintu store(BDK) "B" store(BD) d218 store(BDl) d233 c WTT2 Class 11 - TONE store(TONEK) "jhUJ" store(TONE) "" c d139-d142 store(TONEl) "" c d134-d137 store(TONEu) "" c d232-d235 store(TONEul) "" c d155-d158 c WTT2 Class 12 - AD1 nikhahit, thanthakhat c this lot is never referenced independantly of TONE - see TAD1 c in this implementation the AD1 group is never referenced store(AD1K) "YN" store(AD1) "" store(AD1l) "" store(AD1u) "" c no upper nikhahit store(AD1ul) "" c WTT2 Class 13 - AD2 maitaikhu store(AD2K) "H" store(AD2) d231 store(AD2l) d154 c WTT2 Class 14 - AD3 yamakkan c No key store since a multi-key sequence store(AD3) d238 c WTT2 Class 15 - AV1 sara i? store(AV1K) "b" store(AV1) d212 store(AV1l) d129 c WTT2 Class 16 - AV2 maihanakat, sara ue? store(AV2K) "y7" store(AV2) d209 d214 store(AV2l) d152 d131 c WTT2 Class 17 - AV3 sara ii, sara uee store(AV3K) "un" store(AV3) d213 d215 store(AV3l) d130 d132 c Some useful combination stores c column 3 stores excluding AD2 store(TAD1K) outs(TONEK) outs(AD1K) store(TAD1) outs(TONE) outs(AD1) store(TAD1l) outs(TONEl) outs(AD1l) store(TAD1u) outs(TONEu) outs(AD1u) store(TAD1ul) outs(TONEul) outs(AD1ul) c column 2 stores store(follK) outs(AV1K) outs(AV2K) outs(AV3K) outs(BV1K) outs(BV2K) outs(BDK) store(foll) outs(AV1) outs(AV2) outs(AV3) outs(BV1) outs(BV2) outs(BD) c this lot aren't used, but should be considered part of store(foll) for c contexts: c outs(AV1l) outs(AV2l) outs(AV3l) outs(BV1l) outs(BV2l) outs(BDl)\ c outs(AD3) c notice that these stores are never directly referenced c store(upK) outs(TAD1K) outs(AD2K) c store(up) outs(TAD1) outs(TAD1l) outs(TAD1u) outs(TAD1ul) outs(AD2) \ c outs(AD2l) c store(diaK) outs(follK) outs(upK) store(diaK) outs(follK) outs(TAD1K) outs(AD2K) c this store is never referenced c store(dia) outs(foll) outs(up) group(Main) using keys c Simple rules - key conversions + any(NONK) > index(NON,1) + any(LVK) > index(LV,1) + any(FV1K) > index(FV1,1) + any(FV2K) > index(FV2,1) + any(FV3K) > index(FV3,1) + any(CONSK) > index(CONS,1) c Consonant Contextualisation any(Ctall) + any(AV1K) > context index(AV1l,2) any(Ctall) + any(AV2K) > context index(AV2l,2) any(Ctall) + any(AV3K) > context index(AV3l,2) any(Ctall) + any(AD2K) > context index(AD2l,2) c any(Ctall) + any(BV1K) > context index(BV1,2) c any(Ctall) + any(BV2K) > context index(BV2,2) c any(Ctall) + any(BDK) > context index(BD,2) c any(Clong) + any(AV1K) > context index(AV1,2) c any(Clong) + any(AV2K) > context index(AV2,2) c any(Clong) + any(AV3K) > context index(AV3,2) c any(Clong) + any(AD2K) > context index(AD2,2) any(Clong) + any(BV1K) > context index(BV1l,2) any(Clong) + any(BV2K) > context index(BV2l,2) any(Clong) + any(BDK) > context index(BDl,2) c any(C) + any(follK) > context index(foll,2) c any(C) + any(AD2K) > context index(AD2,2) any(CONS) + any(follK) > context index(foll,2) any(CONS) + any(AD2K) > context index(AD2,2) any(CONS) '~' + '3' > index(CONS,1) d238 c AD3 covered by this rule c any(Ctall) + any(TONEK) > context index(TONEl,2) c any(Ctall) + any(AD1K) > context index(AD1l,2) any(Ctall) + any(TAD1K) > context index(TAD1l,2) c any(Clong) + any(TONEK) > context index(TONE,2) c any(Clong) + any(AD1K) > context index(AD1,2) c any(C) + any(TONEK) > context index(TONE,2) c any(C) + any(AD1K) > context index(AD1,2) any(CONS) + any(TAD1K) > context index(TAD1,2) c Diacritic Contextualisations must occur only after a CONS, otherwise they c are trying some funny business to get around the checking - so catch 'em. c every possible combination must be listed. Add more if you need them. c any(CONS) any(BV1) + any(TONEK) > context index(TONE,3) c any(CONS) any(BV1) + any(AD1K) > context index(AD1,3) any(CONS) any(BV1) + any(TAD1K) > context index(TAD1,3) c any(CONS) any(BV1l) + any(TONEK) > context index(TONE,3) c any(CONS) any(BV1l) + any(AD1K) > context index(AD1,3) any(CONS) any(BV1l) + any(TAD1K) > context index(TAD1,3) c any(CONS) any(AV1) + any(TONEK) > context index(TONEu,3) c any(CONS) any(AV1) + any(AD1K) > context index(AD1u,3) any(CONS) any(AV1) + any(TAD1K) > context index(TAD1u,3) c any(CONS) any(AV1l) + any(TONEK) > context index(TONEul,3) c any(CONS) any(AV1l) + any(AD1K) > context index(AD1ul,3) any(CONS) any(AV1l) + any(TAD1K) > context index(TAD1ul,3) any(CONS) any(BV2) + any(TONEK) > context index(TONE,3) any(CONS) any(BV2l) + any(TONEK) > context index(TONE,3) any(CONS) any(AV2) + any(TONEK) > context index(TONEu,3) any(CONS) any(AV2l) + any(TONEK) > context index(TONEul,3) any(CONS) any(AV3) + any(TONEK) > context index(TONEu,3) any(CONS) any(AV3) + any(AD2K) > context index(AD2,3) c no upper maitaikhu any(CONS) any(AV3l) + any(TONEK) > context index(TONEul,3) any(CONS) any(AV3l) + any(AD2K) > context index(AD2l,3) c no upper maitaikhu c Now for tone vowel reordering - just for fun (not part of WTT2) c any(Clong) any(TAD1) + any(BV1K) > index(Clong,1) index(BV1l,3) index(TAD1,2) c any(Ctall) any(TAD1l) + any(BV1K) > index(Ctall,1) index(BV1,3) index(TAD1l,2) c any(CONS) any(TAD1) + any(BV1K) > index(CONS,1) index(BV1,3) index(TAD1,2) c any(Ctall) any(TAD1l) + any(AV1K) > index(Ctall,1) index(AV1l,3) index(TAD1ul,2) c any(CONS) any(TAD1) + any(AV1K) > index(CONS,1) index(AV1,3) index(TAD1u,2) c any(Clong) any(TONE) + any(BV2K) > index(Clong,1) index(BV2l,3) index(TONE,2) c any(Ctall) any(TONEl) + any(BV2K) > index(Ctall,1) index(BV2,3) index(TONEl,2) c any(CONS) any(TONE) + any(BV2K) > index(CONS,1) index(BV2,3) index(TONE,2) c any(Ctall) any(TONEl) + any(AV2K) > index(Ctall,1) index(AV2l,3) index(TONEul,2) c any(CONS) any(TONE) + any(AV2K) > index(CONS,1) index(AV2,3) index(TONEu,2) c any(Ctall) any(TONEl) + any(AV3K) > index(Ctall,1) index(AV3l,3) index(TONEul,2) c any(CONS) any(TONE) + any(AV3K) > index(CONS,1) index(AV3,3) index(TONEu,2) c any(Ctall) any(AD2l) + any(AV3K) > index(Ctall,1) index(AV3l,3) index(AD2l,2) c any(CONS) any(AD2) + any(AV3K) > index(CONS,1) index(AV3,3) index(AD2,2) c Now to disallow lots of things! c first, anything following a non consonant c any(NON) + any(diaK) > context beep c any(LV) + any(diaK) > context beep c any(FV1) + any(diaK) > context beep c any(FV2) + any(diaK) > context beep c any(FV3) + any(diaK) > context beep c this is a wonderful catch all rule that beeps if any unrecognised c combination (not listed earlier) is typed: + any(diaK) > beep c now for that epsilon multi-key sequence. At least there is only one any(NON) '~' + '3' > context beep any(LV) '~' + '3' > context beep any(FV1) '~' + '3' > context beep any(FV2) '~' + '3' > context beep any(FV3) '~' + '3' > context beep c now any diacritic following itself (nearly)! c any(dia) + any(follK) > context beep c this is 138 rules c any(up) + any(diaK) > context beep c this is 90 rules c any(BV1) + any(AD2K) > context beep c any(BV1l) + any(AD2K) > context beep c any(AV1) + any(AD2K) > context beep c any(AV1l) + any(AD2K) > context beep c any(AD3) + any(upK) > context beep c any(BD) + any(upK) > context beep c any(BDl) + any(upK) > context beep c any(BV2) + any(AD1K) > context beep c any(BV2) + any(AD2K) > context beep c any(BV2l) + any(AD1K) > context beep c any(BV2l) + any(AD2K) > context beep c any(AV2) + any(AD1K) > context beep c any(AV2) + any(AD2K) > context beep c any(AV2l) + any(AD1K) > context beep c any(AV2l) + any(AD2K) > context beep c any(AV3) + any(AD1K) > context beep c any(AV3l) + any(AD1K) > context beep c these are sumarised by: c any(dia) + any(diaK) > context beep c since ordering catches the OK rules first. But this rule too can be removed c since this is covered in the rule: c + any(diaK) > context beep c given above. c Symbols '`' + 'p' > d144 c y-phuuying without subscript tail '`' + 't' > d128 c th-than without subscript tail '`' + '`' > d145 c open single quote '`' + '"' > d147 c open double quote '.' + '"' > d148 c close double quote '.' + "'" > d146 c close single quote d148 + '"' > d133 c ellipses '~' + '3' > '' c d238 epsilon symbol '~' + '"' > '' c d239 fish-eye symbol '~' + 'P' > '' c d250 ending symbol #1 '~' + '~' > '' c d251 ending symbol #2 '~' + '@' > '' c d149 large solid dot at mid-line '-' + '3' > '' c d150 en-dash d150 + '3' > '' c d151 em-dash