1 ;; si-wijesekera.mim -- Sinhala input method with wijesekera method
2 ;; Copyright (C) 2005, 2006, 2008, 2009
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 (version "1.6.l"))
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 surrounding text if possible, or a preedit
35 (use-surrounding-text (_"Surrounding text vs. preedit
36 If 1, try to use surrounding text. Otherwise, use preedit.")
40 ;; skip following (virama zwj consonant)* sequence
44 ((& (= @+0 0x0DCA) (= @+1 0x200D) (>= cc3 0x0D9A) (<= cc3 0x0DC6))
53 ((& (= @-3 0x0DCA) (= @-2 0x200D) (>= cc1 0x0D9A) (<= cc1 0x0DC6))
63 ((| (= @-1 0x200C) (= @-1 0x200D))
65 (delete-preceding-zw))))
69 ((| (= @+0 0x200C) (= @+0 0x200D))
71 (delete-following-zw))))
80 ("A") ("B") ("C") ("D") ("E") ("F") ("G") ("H") ("I") ("J") ("K") ("L") ("M")
81 ("N") ("O") ("P") ("Q") ("R") ("S") ("T") ("U") ("V") ("W") ("X") ("Y") ("Z")
82 ("a") ("b") ("c") ("d") ("e") ("f") ("g") ("h") ("i") ("j") ("k") ("l") ("m")
83 ("n") ("o") ("p") ("q") ("r") ("s") ("t") ("u") ("v") ("w") ("x") ("y") ("z")
84 ("`") ("~") ("\[") ("{") ("\]") ("}") ("\\") ("|") (";") (":") ("'") ("\"")
85 (",") ("<") (".") (">") ((A-o)) ((A-.)) ((A-v)) ((A-c)) ((A-x))
86 ((S-\ )) ((A-\ )) ((A-,)) ((A-a)) ((A-\')) ((A-z)) ((BackSpace)) ((Delete)))
161 ("|" "්") ; touch (ZWJ 0DCA)
162 ("J" "ළු") ; muurdhaja lu (0DC5 0DD4)
174 ((| (< c 0x0D9A) (> c 0x0DC6))
269 ((& (>= c 0x0D9A) (<= c 0x0DC6))
295 ((& (= c 0x200C) (= @+1 0x0DD9))
299 (| (< @-2 0x0D9A) (> @-2 0x0DC6)))
302 ((& (>= @-1 0x0D9A) (<= @-1 0x0DC6))
335 ((& (>= @-1 0x0D9A) (<= @-1 0x0DC6))
336 0x0DCA 0x200D 0x0DBA))
345 ((| (= c 0x0DD9) (= c 0x0DDB) (= c 0x0DD2) (= c 0x0DD3))
350 ((& (>= @-1 0x0D9A) (<= @-1 0x0DC6))
351 0x0DCA 0x200D 0x0DBB))
360 ((| (= c 0x0DD9) (= c 0x0DDB))
366 ((& (>= @-1 0x0D9A) (<= @-1 0x0DC6))
371 0x0DBB 0x0DCA 0x200D))
378 (delete-preceding-zw)
400 (cond ((& (>= @-1 0x0D9A) (<= @-1 0x0DC6)) 0x200C))
407 ((& (>= c 0x0D9A) (<= c 0x0DC6) (= @-2 0x0DCA) (= @-1 0x200D))
417 ((| (< @-1 0x0D9A) (> @-1 0x0DC6)))
422 ((& (>= @+0 0x0D9A) (<= @+0 0x0DC6))
442 ((& (>= @-2 0x0D9A) (<= @-2 0x0DC6))
446 ((& (= @-4 0x0DBB) (= @-3 0x0DCA) (= @-2 0x200D))
451 ((& (>= @-4 0x0D9A) (<= @-4 0x0DC6) (= @-3 0x0DCA) (= @-2 0x200D))
463 ((| (< @-1 0x0D9A) (> @-1 0x0DC6))
465 ((& (>= @-2 0x0D9A) (<= @-2 0x0DC6))
469 ((& (= @-4 0x0DBB) (= @-3 0x0DCA) (= @-2 0x200D))
474 ((& (>= @-4 0x0D9A) (<= @-4 0x0DC6) (= @-3 0x0DCA) (= @-2 0x200D))
493 (| (= @+0 0x0DD9) (= @+0 0x0DDB)))
497 (delete-following-zw)
520 ((& (>= c 0x0D9A) (<= c 0x0DC6))
566 ((A-.) "ඟ") ((0x2E A-z) "ඟ") ; 0D9F
573 ((A-c) "ඦ") ((0x63 A-z) "ඦ") ; 0DA6
579 ((A-v) "ඬ") ((0x76 A-z) "ඬ") ; 0DAC
585 ((A-o) "ඳ") ((0x6F A-z) "ඳ") ; 0DB3
604 ("J" "ළු") ; muurdhaja lu (0DC5 0DD4)
606 ((S-\ ) " ") ; NBSP (00A0)
607 ((A-\ ) "") ; ZWNJ (200C)
622 ((= @-1 0x0D91) (delete @-) "ඒ") ; 0D92
623 ((= @-1 0x0D94) (delete @-) "ඕ") ; 0D95
624 ((= @-1 0x0DD9) (delete @-) "ේ") ; 0DDA
625 ((= @-1 0x0DDC) (delete @-) "ෝ") ; 0DDD
629 ((= @-1 0x0D85) (delete @-) "ආ") ; 0D86
630 ((= @-1 0x0DD9) (delete @-) "ො") ; 0DDC
634 ((= @-1 0x0D85) (delete @-) "ඇ") ; 0D87
638 ((= @-1 0x0D85) (delete @-) "ඈ") ; 0D88
639 ((& (= @-2 0x0DC5) (= @-1 0x0DD4))
640 (delete @-) "ූ") ; 0DD6
649 ((= @-1 0x0D8D) (delete @-) "ඎ") ; 0D8E
650 ;; The following line does not work when no consonant proceeds.
651 ;; ((= @-1 0x0DD8) (delete @-) "ෲ") ; 0DF2
653 ;; This one works with or without a preceeding consonant.
658 ((= @-1 0x0D8B) (delete @-) "ඌ") ; 0D8C
659 ((= @-1 0x0D8F) (delete @-) "ඐ") ; 0D90
660 ((= @-1 0x0D94) (delete @-) "ඖ") ; 0D96
661 ((= @-1 0x0DD9) (delete @-) "ෞ") ; 0DDE
665 ("H" ; yansaya (0DCA 200D 0DBA)
667 ((| (= @-1 0x0DD9) (= @-1 0x0DDB))
668 (move @-) "්ය" (move @>))
672 ("`" ; rakaransaya (0DCA 200D 0DBB)
674 ((| (= @-1 0x0DD2) (= @-1 0x0DD3) (= @-1 0x0DD9) (= @-1 0x0DDB))
675 (move @-) "්ර" (move @>))
678 ("~" ; repaya (0DBB 0DCA 200D)
698 ((& (= use-surrounding-text 1) (= @-0 -1))
699 (shift surrounding-text))
713 ((| (< @-2 0x0D9A) (> @-2 0x0DC6))
723 ((| (< @-2 0x0D9A) (> @-2 0x0DC6))
738 ((| (= c 0x0DD9) (= c 0x0DDB))
740 ((& (>= @-2 0x0D9A) (<= @-2 0x0DC6))
745 ((& (>= c 0x0D9A) (<= c 0x0DC6))
748 (shift surrounding-text))
752 (shift surrounding-text)))
756 (shift independent-state))
758 (shift kombuva-state))
765 ((| (= @-1 0x0DD9) (= @-1 0x0DDB))
767 ((| (< @-1 0x0D9A) (> @-1 0x0DC6))
770 (shift join-state))))
781 ((| (= c 0x0DD9) (= c 0x0DDB))
789 (shift independent-state))
798 ((& (= @0 0x0DD9) (= @1 0x0D91))
801 (shift independent-state))
802 ((& (= @0 0x0DD9) (< @2 0))
807 (shift independent-state))
808 ((& (= @0 0x0DDB) (< @2 0))
813 (shift independent-state))
821 ((& (= @0 0x0DD9) (< @2 0))