;; si-phonetic-dynamic.mim -- Sinhala phonetic dynamic keymap
+;; Copyright (C) 2007-2008 Harshula Jayasuriya <harshula@gmail.com>
+
+;; This program is free software; you can redistribute it and/or
+;; modify it under the terms of the GNU General Public License
+;; as published by the Free Software Foundation; either version 2
+;; of the License, or (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program; if not, write to the Free Software
+;; Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
;; m17n Keymap file for Sinhala (Sri Lanka) (2007-07-08)
;; Maintainer: Harshula Jayasuriya <harshula@gmail.com>
-;; Last Updated: 2007-11-06
+;; Last Updated: 2008-12-26
;; This is a phonetic dynamic mapping for a standard US-English keyboard
;; (qwerty)
;; http://www.nongnu.org/sinhala/doc/keymaps/sinhala-keyboard_4.html
(title "සි (Phonetic Dynamic)")
+(macro
+ (delete-al-zwj
+ (cond
+ ((& (= @-2 0x0DCA) (= @-1 0x200D))
+ (delete @-2)
+ ;; repaya
+ (cond
+ ((= @-1 0x0DBB)
+ (delete @-1)
+ )
+ )
+ )
+ )
+ )
+
+ (insert-vowel
+ (cond
+ ((& (>= @-1 0x0D9A) (<= @-1 0xDC6))
+ (cond
+ ((= c 0x0D85) "්") ; 0x0dca - al-lakuna
+ ((= c 0x0D86) "ා") ; 0x0dcf - aela-pilla (aa)
+ ((= c 0x0D87) "ැ") ; 0x0dd0 - ketti aeda-pilla (ae)
+ ((= c 0x0D88) "ෑ") ; 0x0dd1 - diga aeda-pilla (aae)
+ ((= c 0x0D89) "ි") ; 0x0dd2 - ketti is-pilla (i)
+ ((= c 0x0D8A) "ී") ; 0x0dd3 - diga is-pilla (ii)
+ ((= c 0x0D8B) "ු") ; 0x0dd4 - ketti paa-pilla (u)
+ ((= c 0x0D8C) "ූ") ; 0x0dd6 - diga paa-pilla (uu)
+ ((= c 0x0D8D) "ෘ") ; 0x0dd8 - gaetta-pilla (r)
+ ((= c 0x0D8E) "ෲ") ; 0x0df2 - diga gaetta-pilla (rr)
+ ((= c 0x0D8F) "ෟ") ; 0x0ddf - gayanukitta (l)
+ ((= c 0x0D90) "ෳ") ; 0x0df3 - diga gayanukitta (ll)
+ ((= c 0x0D91) "ෙ") ; 0x0dd9 - kombuva (e)
+ ((= c 0x0D92) "ේ") ; 0x0dda - diga kombuva (ee)
+ ((= c 0x0D93) "ෛ") ; 0x0ddb - kombu deka (ai)
+ ((= c 0x0D94) "ො") ; 0x0ddc - kombuva haa aela-pilla (o)
+ ((= c 0x0D95) "ෝ") ; 0x0ddd - kombuva haa diga aela-pilla (oo)
+ ((= c 0x0D96) "ෞ") ; 0x0dde - kombuva haa gayanukitta (au)
+ )
+ )
+ (1
+ (insert c)
+ )
+ )
+ )
+
+)
+
(map
- (consonants
+ (phon
+ ((A-n) "ං") ; 0x0d82 - anusvaraya (anusvara)
+ ("H" "ඃ") ; 0x0d83 - visargaya (visarga)
+
+ ("a" (set c 0x0D85) (insert-vowel)) ; 0x0d85 - ayanna (a)
+ ("A" (set c 0x0D86) (insert-vowel)) ; 0x0d86 - aayanna (aa)
+ ("w" (set c 0x0D87) (insert-vowel)) ; 0x0d87 - aeyanna (ae)
+ ("W" (set c 0x0D88) (insert-vowel)) ; 0x0d88 - aeeyanna (aee)
+ ("i" (set c 0x0D89) (insert-vowel)) ; 0x0d89 - iyanna (i)
+ ("I" (set c 0x0D8A) (insert-vowel)) ; 0x0d8a - iiyanna (ii)
+ ("u" (set c 0x0D8B) (insert-vowel)) ; 0x0d8b - uyanna (u)
+ ("U" (set c 0x0D8C) (insert-vowel)) ; 0x0d8c - uuyanna (uu)
+ ("q" (set c 0x0D8D) (insert-vowel)) ; 0x0d8d - iruyanna (iru)
+ ("Q" (set c 0x0D8E) (insert-vowel)) ; 0x0d8e - iruuyanna (iruu)
+ ((A-l) (set c 0x0D8F) (insert-vowel)) ; 0x0d8f - iluyanna (ilu)
+ ((A-L) (set c 0x0D90) (insert-vowel)) ; 0x0d90 - iluuyanna (iluu)
+ ("e" (set c 0x0D91) (insert-vowel)) ; 0x0d91 - eyanna (e)
+ ("E" (set c 0x0D92) (insert-vowel)) ; 0x0d92 - eeyanna (ee)
+ ((A-e) (set c 0x0D93) (insert-vowel)) ; 0x0d93 - aiyanna (ai)
+ ("o" (set c 0x0D94) (insert-vowel)) ; 0x0d94 - oyanna (o)
+ ("O" (set c 0x0D95) (insert-vowel)) ; 0x0d95 - ooyanna (oo)
+ ((A-o) (set c 0x0D96) (insert-vowel)) ; 0x0d96 - auyanna (au)
+
("k" "ක") ; 0x0d9a - alpapraana kayanna (ka)
("K" "ඛ") ; 0x0d9b - mahaapraana kayanna (kha)
("g" "ග") ; 0x0d9c - alpapraana gayanna (ga)
("h" "හ") ; 0x0dc4 - hayanna (ha)
("L" "ළ") ; 0x0dc5 - muurdhaja layanna (lla)
("f" "ෆ") ; 0x0dc6 - fayanna (fa)
- )
-
- (vowels
- ("a" (set c 0x0D85) (insert-vowel)) ; 0x0d85 - ayanna (a)
- ("A" (set c 0x0D86) (insert-vowel)) ; 0x0d86 - aayanna (aa)
- ("w" (set c 0x0D87) (insert-vowel)) ; 0x0d87 - aeyanna (ae)
- ("W" (set c 0x0D88) (insert-vowel)) ; 0x0d88 - aeeyanna (aee)
- ("i" (set c 0x0D89) (insert-vowel)) ; 0x0d89 - iyanna (i)
- ("I" (set c 0x0D8A) (insert-vowel)) ; 0x0d8a - iiyanna (ii)
- ("u" (set c 0x0D8B) (insert-vowel)) ; 0x0d8b - uyanna (u)
- ("U" (set c 0x0D8C) (insert-vowel)) ; 0x0d8c - uuyanna (uu)
- ("q" (set c 0x0D8D) (insert-vowel)) ; 0x0d8d - iruyanna (iru)
- ("Q" (set c 0x0D8E) (insert-vowel)) ; 0x0d8e - iruuyanna (iruu)
- ((A-l) (set c 0x0D8F) (insert-vowel)) ; 0x0d8f - iluyanna (ilu)
- ((A-L) (set c 0x0D90) (insert-vowel)) ; 0x0d90 - iluuyanna (iluu)
- ("e" (set c 0x0D91) (insert-vowel)) ; 0x0d91 - eyanna (e)
- ("E" (set c 0x0D92) (insert-vowel)) ; 0x0d92 - eeyanna (ee)
- ((A-e) (set c 0x0D93) (insert-vowel)) ; 0x0d93 - aiyanna (ai)
- ("o" (set c 0x0D94) (insert-vowel)) ; 0x0d94 - oyanna (o)
- ("O" (set c 0x0D95) (insert-vowel)) ; 0x0d95 - ooyanna (oo)
- ((A-o) (set c 0x0D96) (insert-vowel)) ; 0x0d96 - auyanna (au)
- )
- (remainder
- ((A-n) "ං") ; 0x0d82 - anusvaraya (anusvara)
- ("H" "ඃ") ; 0x0d83 - visargaya (visarga)
((A-.) "෴") ; 0x0df4 - kunddaliya (punctuation)
+
("R" "්ර") ; 0x0dca,0x200d,0x0dbb - rakaaranshaya
("Y" "්ය") ; 0x0dca,0x200d,0x0dba - yansaya
((A-r) "ර්") ; 0x0dbb,0x0dca,0x200d - repaya
)
)
)
-
-)
-
-(macro
- (delete-al-zwj
- (cond
- ((& (= @-2 0x0DCA) (= @-1 0x200D))
- (delete @-2)
- ;; repaya
- (cond
- ((= @-1 0x0DBB)
- (delete @-1)
- )
- )
- )
- )
- )
-
- (insert-vowel
- (cond
- ((& (>= @-1 0x0D9A) (<= @-1 0xDC6))
- (cond
- ((= c 0x0D85) "්") ; 0x0dca - al-lakuna
- ((= c 0x0D86) "ා") ; 0x0dcf - aela-pilla (aa)
- ((= c 0x0D87) "ැ") ; 0x0dd0 - ketti aeda-pilla (ae)
- ((= c 0x0D88) "ෑ") ; 0x0dd1 - diga aeda-pilla (aae)
- ((= c 0x0D89) "ි") ; 0x0dd2 - ketti is-pilla (i)
- ((= c 0x0D8A) "ී") ; 0x0dd3 - diga is-pilla (ii)
- ((= c 0x0D8B) "ු") ; 0x0dd4 - ketti paa-pilla (u)
- ((= c 0x0D8C) "ූ") ; 0x0dd6 - diga paa-pilla (uu)
- ((= c 0x0D8D) "ෘ") ; 0x0dd8 - gaetta-pilla (r)
- ((= c 0x0D8E) "ෲ") ; 0x0df2 - diga gaetta-pilla (rr)
- ((= c 0x0D8F) "ෟ") ; 0x0ddf - gayanukitta (l)
- ((= c 0x0D90) "ෳ") ; 0x0df3 - diga gayanukitta (ll)
- ((= c 0x0D91) "ෙ") ; 0x0dd9 - kombuva (e)
- ((= c 0x0D92) "ේ") ; 0x0dda - diga kombuva (ee)
- ((= c 0x0D93) "ෛ") ; 0x0ddb - kombu deka (ai)
- ((= c 0x0D94) "ො") ; 0x0ddc - kombuva haa aela-pilla (o)
- ((= c 0x0D95) "ෝ") ; 0x0ddd - kombuva haa diga aela-pilla (oo)
- ((= c 0x0D96) "ෞ") ; 0x0dde - kombuva haa gayanukitta (au)
- )
- )
- (1
- (insert c)
- )
- )
- )
-
)
(state
(init
- (consonants)
- (vowels)
- (remainder)
+ (phon)
)
)