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.
37 (delete-preceding-zw (set x 0))
38 (delete-following-zw (set x 0))
40 ;; skip following (virama zwj consonant)* sequence
44 ((& (= @+1 0x0DCA) (= @+2 0x200D) (>= cc3 0x0D9A) (<= cc3 0x0DC6))
53 ((& (= @-3 0x0DCA) (= @-2 0x200D) (>= cc1 0x0D9A) (<= cc1 0x0DC6))
63 ((| (= @-1 0x200C) (= @-1 0x200D))
65 (delete-preceding-zw))))
69 ((| (= @+1 0x200C) (= @+1 0x200D))
71 (delete-following-zw))))
152 ("|" "්") ; touch (ZWJ 0DCA)
153 ("J" "ළු") ; muurdhaja lu (0DC5 0DD4)
165 ((| (< c 0x0D9A) (> c 0x0DC6))
260 ((& (>= c 0x0D9A) (<= c 0x0DC6))
286 ((& (= c 0x200C) (= @+2 0x0DD9))
290 (| (< @-2 0x0D9A) (> @-2 0x0DC6)))
293 ((& (>= @-1 0x0D9A) (<= @-1 0x0DC6))
326 ((& (>= @-1 0x0D9A) (<= @-1 0x0DC6))
327 0x0DCA 0x200D 0x0DBA))
336 ((| (= c 0x0DD9) (= c 0x0DDB) (= c 0x0DD2) (= c 0x0DD3))
341 ((& (>= @-1 0x0D9A) (<= @-1 0x0DC6))
342 0x0DCA 0x200D 0x0DBB))
351 ((| (= c 0x0DD9) (= c 0x0DDB))
357 ((& (>= @-1 0x0D9A) (<= @-1 0x0DC6))
362 0x0DBB 0x0DCA 0x200D))
369 (delete-preceding-zw)
391 (cond ((& (>= @-1 0x0D9A) (<= @-1 0x0DC6)) 0x200C))
398 ((& (>= c 0x0D9A) (<= c 0x0DC6) (= @-2 0x0DCA) (= @-1 0x200D))
408 ((| (< @-1 0x0D9A) (> @-1 0x0DC6)))
413 ((& (>= @+1 0x0D9A) (<= @+1 0x0DC6))
433 ((& (>= @-2 0x0D9A) (<= @-2 0x0DC6))
437 ((& (= @-4 0x0DBB) (= @-3 0x0DCA) (= @-2 0x200D))
442 ((& (>= @-4 0x0D9A) (<= @-4 0x0DC6) (= @-3 0x0DCA) (= @-2 0x200D))
454 ((| (< @-1 0x0D9A) (> @-1 0x0DC6))
456 ((& (>= @-2 0x0D9A) (<= @-2 0x0DC6))
460 ((& (= @-4 0x0DBB) (= @-3 0x0DCA) (= @-2 0x200D))
465 ((& (>= @-4 0x0D9A) (<= @-4 0x0DC6) (= @-3 0x0DCA) (= @-2 0x200D))
484 (| (= @+1 0x0DD9) (= @+1 0x0DDB)))
488 (delete-following-zw)
511 ((& (>= c 0x0D9A) (<= c 0x0DC6))
543 ("\\" (shift join))))
556 ((| (< @-2 0x0D9A) (> @-2 0x0DC6))
566 ((| (< @-2 0x0D9A) (> @-2 0x0DC6))
577 ((| (= c 0x0DD9) (= c 0x0DDB))
579 ((& (>= @-2 0x0D9A) (<= @-2 0x0DC6))
584 ((& (>= c 0x0D9A) (<= c 0x0DC6))