+;; si-wijesekera.mim -- Sinhala input method with wijesekera method
;; Copyright (C) 2005, 2006
;; National Institute of Advanced Industrial Science and Technology (AIST)
;; Registration Number H15PRO112
;; You should have received a copy of the GNU Lesser General Public
;; License along with the m17n library; if not, write to the Free
-;; Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-;; 02111-1307, USA.
+;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
(input-method si wijesekera)
(description "Sinhala input method based on SLS 1134 Rev. 2:2004.
- <http://http://www.fonts.lk/doc/sin-kbd-layout4.pdf>
+ <http://www.fonts.lk/doc/sin-kbd-layout4.pdf>
+This input method requires surrounding text support.
")
-(title "Wijesekera")
+(title "සි")
(map
(consonant
((> c 0)
(insert c))))
-;; Repaya is disabled.
-;; ("~"
-;; (set c @-1)
-;; (cond
-;; ((| (= c 0x0DD9) (= c 0x0DDB))
-;; (delete @-1))
-;; (1
-;; (set c 0)))
-;; (backward)
-;; (cond
-;; ((& (>= @-1 0x0D9A) (<= @-1 0x0DC6))
-;; (set c1 @-1)
-;; (delete @-1)
-;; (insert c1)
-;; (move @<)
-;; 0x0DBB 0x0DCA 0x200D))
-;; (cond
-;; ((> c 0)
-;; (move @>)
-;; (insert c))))
+ ;; repaya
+ ("~"
+ (set c @-1)
+ (cond
+ ((| (= c 0x0DD9) (= c 0x0DDB))
+ (delete @-1))
+ (1
+ (set c 0)))
+ (backward)
+ (cond
+ ((& (>= @-1 0x0D9A) (<= @-1 0x0DC6))
+ (set c1 @-1)
+ (delete @-1)
+ (insert c1)
+ (move @<)
+ 0x0DBB 0x0DCA 0x200D))
+ (cond
+ ((> c 0)
+ (move @>)
+ (insert c))))
((BackSpace)
(delete-preceding-zw)
(set c1 @+1)
(cond
((= @+2 0x0DD9)
- (merge-combuva)
+ (merge-kombuva)
0x0DDB)
((= @+2 0x0DCA)
- (merge-combuva)
+ (merge-kombuva)
0x0DDA)
((= @+2 0x0DCF)
- (merge-combuva)
+ (merge-kombuva)
0x0DDC)
((= @+2 0x0DDF)
- (merge-combuva)
+ (merge-kombuva)
0x0DDE)
(1
(delete @-1)
0x0DCA)
((= c 0x0D93)
0x0D91)
-
- ((= c 0x0D9A)
- (insert "A")
- (delete @+1))
-
((& (>= c 0x0D9A) (<= c 0x0DC6))
(forward)
(cond
(delete @+1)
(delete-following-zw))))
- (merge-combuva
+ (merge-kombuva
(delete @-1)
(delete @+2)
(insert c1)))
(state
(init
(consonant
+ (move @<)
(cond
((= @-1 0x0DD9)
(cond
((= @-2 0x200C)
(delete @-2)
+ (move @>)
0x0DD9)
((| (< @-2 0x0D9A) (> @-2 0x0DC6))
(delete @-1)
+ (move @>)
0x0DD9)))
((= @-1 0x0DDB)
(cond
((= @-2 0x200C)
(delete @-2)
+ (move @>)
0x0DDB)
((| (< @-2 0x0D9A) (> @-2 0x0DC6))
(delete @-1)
+ (move @>)
0x0DDB)))))
(misc))
(join
(consonant
+ (move @<)
(set c @-1)
(cond
((| (= c 0x0DD9) (= c 0x0DDB))
(cond
((& (>= @-2 0x0D9A) (<= @-2 0x0DC6))
(delete @-1)
- (move @<)
0x0DCA 0x200D
(move @>)
(insert c))))
((& (>= c 0x0D9A) (<= c 0x0DC6))
- (move @<)
0x0DCA 0x200D))
(shift init))