1 ;; tai-sonla.mim -- Tai Viet input method with Phonetic sequence
3 ;; Thua Thien Hue Center of Information Technology (HueCIT, Vietnam)
5 ;; National Institute of Advanced Industrial Science and Technology (AIST)
6 ;; Registration Number H15PRO112
8 ;; This file is part of the m17n contrib; a sub-part of the m17n
11 ;; The m17n library is free software; you can redistribute it and/or
12 ;; modify it under the terms of the GNU Lesser General Public License
13 ;; as published by the Free Software Foundation; either version 2.1 of
14 ;; the License, or (at your option) any later version.
16 ;; The m17n library is distributed in the hope that it will be useful,
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 ;; Lesser General Public License for more details.
21 ;; You should have received a copy of the GNU Lesser General Public
22 ;; License along with the m17n library; if not, write to the Free
23 ;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
24 ;; Boston, MA 02110-1301, USA.
26 (input-method tai sonla-kbd)
30 (description (_"Tai Viet input method using the phonetic key sequence with the Tai Son La keyboard layout.
31 The phonetic key sequence means that you type a syllable in this order:
34 C is an initial consonant,
35 W is a label for labializing C ('ꪫ'),
36 V is a vowel (V1:prefix, V2:combining, or V3:postfix),
37 v is the second vowel of a digraph vowel
38 (in the case that V is 'ꪹ' and v is 'ꪸ', 'ꪷ', or 'ꪱ'),
39 F is a final consonant,
40 T is a tonemark (spacing or combining).
42 You can type special symbols by these keys:
54 (cond ((| (= T ?ꫀ) (= T ?ꫂ)) (delete @-) (move @>))
55 ((> T 0) (move M) (delete @+) (move @>)))
57 (cond ((| (= T ?ꫀ) (= T ?ꫂ)) (insert T))
58 ((> T 0) (move M) (insert T) (move @>)))))
154 ;; Note: "ꪮ" and "ꪯ" can be consonant and vowel.
194 ((BackSpace) (sub K 1) (undo K))))
199 (consonant (mark M) (shift after-c))
208 (t (mark M) (set V2 0) (set K @@))
210 (vowel-pre (set V1 @-1)
212 (move @<) (insert V1) (move @>) (shift after-c-vpre))
213 (vowel-combining (cond ((> V2 0) (move @-) (delete @-) (move @>))
215 (set V2 @-1) (mark M))
216 (vowel-post (shift after-c-v))
217 (vowel-digraph (mark M) (move @<) (insert "ꪹ") (move @>)
219 (final-c (delete @-) (pushback 1) (shift init))
221 (nil (shift after-c-v)))
225 (vowel-combining (set V2 @-1) (mark M) (shift after-c-v))
226 (vowel-post (shift after-c-v))
228 (nil (shift after-c-v)))
231 (t (set T 0) (set K @@))
232 (tone (cond ((= T 0) (set K @@))) (adjust-tone))
233 (final-c (shift after-c-v-f))