1 ;; si-wijesekera.mim -- Sinhala input method with wijesekera method
2 ;; Copyright (C) 2005, 2006
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., 51 Franklin Street, Fifth Floor,
22 ;; Boston, MA 02110-1301, USA.
24 (input-method si wijesekera)
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 requires surrounding text support.
107 ("|" "්") ; touch (ZWJ 0DCA)
108 ("J" "ළු") ; muurdhaja lu (0DC5 0DD4)
120 ((| (< c 0x0D9A) (> c 0x0DC6))
215 ((& (>= c 0x0D9A) (<= c 0x0DC6))
241 ((& (= c 0x200C) (= @+2 0x0DD9))
245 (| (< @-2 0x0D9A) (> @-2 0x0DC6)))
248 ((& (>= @-1 0x0D9A) (<= @-1 0x0DC6))
281 ((& (>= @-1 0x0D9A) (<= @-1 0x0DC6))
282 0x0DCA 0x200D 0x0DBA))
291 ((| (= c 0x0DD9) (= c 0x0DDB) (= c 0x0DD2) (= c 0x0DD3))
296 ((& (>= @-1 0x0D9A) (<= @-1 0x0DC6))
297 0x0DCA 0x200D 0x0DBB))
302 ;; Repaya is disabled.
306 ;; ((| (= c 0x0DD9) (= c 0x0DDB))
312 ;; ((& (>= @-1 0x0D9A) (<= @-1 0x0DC6))
317 ;; 0x0DBB 0x0DCA 0x200D))
324 (delete-preceding-zw)
346 (cond ((& (>= @-1 0x0D9A) (<= @-1 0x0DC6)) 0x200C))
353 ((& (>= c 0x0D9A) (<= c 0x0DC6) (= @-2 0x0DCA) (= @-1 0x200D))
358 ((| (< @-1 0x0D9A) (> @-1 0x0DC6)))
363 ((& (>= @+1 0x0D9A) (<= @+1 0x0DC6))
383 ((& (>= @-2 0x0D9A) (<= @-2 0x0DC6))
387 ((& (>= @-4 0x0D9A) (<= @-4 0x0DC6) (= @-3 0x0DCA) (= @-2 0x200D))
399 ((| (< @-1 0x0D9A) (> @-1 0x0DC6))
401 ((& (>= @-2 0x0D9A) (<= @-2 0x0DC6))
405 ((& (>= @-4 0x0D9A) (<= @-4 0x0DC6) (= @-3 0x0DCA) (= @-2 0x200D))
424 (| (= @+1 0x0DD9) (= @+1 0x0DDB)))
428 (delete-following-zw)
451 ((& (>= c 0x0D9A) (<= c 0x0DC6))
483 ("\\" (shift join))))
489 (delete-preceding-zw (set x 0))
490 (delete-following-zw (set x 0))
492 ;; skip following (virama zwj consonant)* sequence
496 ((& (= @+1 0x0DCA) (= @+2 0x200D) (>= cc3 0x0D9A) (<= cc3 0x0DC6))
505 ((& (= @-3 0x0DCA) (= @-2 0x200D) (>= cc1 0x0D9A) (<= cc1 0x0DC6))
515 ((| (= @-1 0x200C) (= @-1 0x200D))
517 (delete-preceding-zw))))
521 ((| (= @+1 0x200C) (= @+1 0x200D))
523 (delete-following-zw))))
539 ((| (< @-2 0x0D9A) (> @-2 0x0DC6))
547 ((| (< @-2 0x0D9A) (> @-2 0x0DC6))
556 ((| (= c 0x0DD9) (= c 0x0DDB))
558 ((& (>= @-2 0x0D9A) (<= @-2 0x0DC6))
564 ((& (>= c 0x0D9A) (<= c 0x0DC6))