;; 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-09-10
;; 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
("k" "ක") ; 0x0d9a - alpapraana kayanna (ka)
)
-(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)