1 ;; si-wijesekera-preedit.mim -- Sinhala input method with wijesekera method
3 ;; National Institute of Advanced Industrial Science and Technology (AIST)
4 ;; Registration Number H15PRO112
6 ;; This file is part of the m17n database; a sub-part of the m17n
9 ;; The m17n library is free software; you can redistribute it and/or
10 ;; modify it under the terms of the GNU Lesser General Public License
11 ;; as published by the Free Software Foundation; either version 2.1 of
12 ;; the License, or (at your option) any later version.
14 ;; The m17n library is distributed in the hope that it will be useful,
15 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 ;; Lesser General Public License for more details.
19 ;; You should have received a copy of the GNU Lesser General Public
20 ;; License along with the m17n library; if not, write to the Free
21 ;; Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
24 (input-method si wijesekera-preedit)
26 (description "Sinhala input method based on SLS 1134 Rev. 2:2004.
27 <http://www.fonts.lk/doc/sin-kbd-layout4.pdf>
28 This input method uses preedit rather than surrounding text.
48 ((A-.) "ඟ") ((0x2E A-z) "ඟ") ; 0D9F
55 ((A-c) "ඦ") ((0x63 A-z) "ඦ") ; 0DA6
61 ((A-v) "ඬ") ((0x76 A-z) "ඬ") ; 0DAC
67 ((A-o) "ඳ") ((0x6F A-z) "ඳ") ; 0DB3
86 ("J" "ළු") ; muurdhaja lu (0DC5 0DD4)
88 ((S-\ ) " ") ; NBSP (00A0)
89 ((A-\ ) "") ; ZWNJ (200C)
104 ((= @- 0x0D91) (delete @-) "ඒ") ; 0D92
105 ((= @- 0x0D94) (delete @-) "ඕ") ; 0D95
106 ((= @- 0x0DD9) (delete @-) "ේ") ; 0DDA
107 ((= @- 0x0DDC) (delete @-) "ෝ") ; 0DDD
111 ((= @- 0x0D85) (delete @-) "ආ") ; 0D86
112 ((= @- 0x0DD9) (delete @-) "ො") ; 0DDC
116 ((= @- 0x0D85) (delete @-) "ඇ") ; 0D87
120 ((= @- 0x0D85) (delete @-) "ඈ") ; 0D88
121 ((& (= @-2 0x0DC5) (= @- 0x0DD4))
122 (delete @-) "ූ") ; 0DD6
131 ((= @- 0x0D8D) (delete @-) "ඎ") ; 0D8E
132 ;; The following line does not work when no consonant proceeds.
133 ;; ((= @- 0x0DD8) (delete @-) "ෲ") ; 0DF2
135 ;; This one works with or without a preceeding consonant.
140 ((= @- 0x0D8B) (delete @-) "ඌ") ; 0D8C
141 ((= @- 0x0D8F) (delete @-) "ඐ") ; 0D90
142 ((= @- 0x0D94) (delete @-) "ඖ") ; 0D96
143 ((= @- 0x0DD9) (delete @-) "ෞ") ; 0DDE
147 ("H" ; yansaya (0DCA 200D 0DBA)
149 ((| (= @- 0x0DD9) (= @- 0x0DDB))
150 (move @-) "්ය" (move @>))
154 ("`" ; rakaransaya (0DCA 200D 0DBB)
156 ((| (= @- 0x0DD2) (= @- 0x0DD3) (= @- 0x0DD9) (= @- 0x0DDB))
157 (move @-) "්ර" (move @>))
160 ("~" ; repaya (0DBB 0DCA 200D)
179 (shift independent-state))
181 (shift kombuva-state))
188 ((| (= @- 0x0DD9) (= @- 0x0DDB))
190 ((| (< @- 0x0D9A) (> @- 0x0DC6))
193 (shift join-state))))
204 ((| (= c 0x0DD9) (= c 0x0DDB))
212 (shift independent-state))
221 ((& (= @0 0x0DD9) (= @1 0x0D91))
224 (shift independent-state))
225 ((& (= @0 0x0DD9) (< @2 0))
230 (shift independent-state))
231 ((& (= @0 0x0DDB) (< @2 0))
236 (shift independent-state))
240 (shift init-state))))
244 ((& (= @0 0x0DD9) (< @2 0))
250 (shift init-state))))