(state:state-LVT-or-LVTL): Add backspace branch.
[m17n/m17n-db.git] / MIM / sa-harvard-kyoto.mim
1 ;; sa-harvard-kyoto.mim -- Sanscrit input method with Harvard-Kyoto convention
2 ;; Copyright (C) 2008
3 ;;   National Institute of Advanced Industrial Science and Technology (AIST)
4 ;;   Registration Number H15PRO112
5
6 ;; This file is part of the m17n database; a sub-part of the m17n
7 ;; library.
8
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.
13
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.
18
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.
23
24 (input-method sa harvard-kyoto)
25
26 (description "Sanscrit input method with Harvard-Kyoto convention.
27 The table is based on 
28   <http://en.wikipedia.org/wiki/Harvard-Kyoto>
29 ")
30
31 (title "क")
32
33 (map
34  (starter
35   ((S-\ )) ((C-@))
36   ("0") ("1") ("2") ("3") ("4") ("5") ("6") ("7") ("8") ("9")
37   ("A") ("D") ("G") ("H") ("I") ("J")
38   ("M") ("N") ("R") ("S") ("T") ("U")
39   ("a") ("b") ("c") ("d") ("e") ("g") ("h") ("i")
40   ("j") ("k") ("l") ("m") ("n") ("o") ("p") ("r")
41   ("s") ("t") ("u") ("v") ("y") ("z")
42   ((KP_1)) ((KP_2)) ((KP_3)) ((KP_4)) ((KP_5))
43   ((KP_6)) ((KP_7)) ((KP_8)) ((KP_9)) ((KP_0)))
44
45  (consonant
46   ("k" "क्")
47   ("kh" "ख्")
48   ("g" "ग्")
49   ("gh" "घ्")
50   ("G" "ङ्")
51   ("c" "च्")
52   ("ch" "छ्")
53   ("j" "ज्")
54   ("jh" "झ्")
55   ("J" "ञ्")
56   ("T" "ट्")
57   ("Th" "ठ्")
58   ("D" "ड्")
59   ("Dh" "ढ्")
60   ("N" "ण्")
61   ("t" "त्")
62   ("th" "थ्")
63   ("d" "द्")
64   ("dh" "ध्")
65   ("n" "न्")
66   ("p" "प्")
67   ("ph" "फ्")
68   ("b" "ब्")
69   ("bh" "भ्")
70   ("m" "म्")
71   ("y" "य्")
72   ("r" "र्")
73   ("l" "ल्")
74   ("v" "व्")
75   ("z" "श्")
76   ("S" "ष्")
77   ("s" "स्")
78   ("h" "ह्"))
79
80  (independent
81   ("M" "ं")
82   ("H" "ः")
83   ("a" "अ")
84   ("A" "आ")
85   ("i" "इ")
86   ("I" "ई")
87   ("u" "उ")
88   ("U" "ऊ")
89   ("R" "ऋ")
90   ("lR" "ऌ")
91   ("e" "ए")
92   ("ai" "ऐ")
93   ("o" "ओ")
94   ("au" "औ")
95   ("RR" "ॠ")
96   ("lRR" "ॡ")
97   ("0" "०")
98   ("1" "१")
99   ("2" "२")
100   ("3" "३")
101   ("4" "४")
102   ("5" "५")
103   ("6" "६")
104   ("7" "७")
105   ("8" "८")
106   ("9" "९")
107   ((KP_0) "०")
108   ((KP_1) "१")
109   ((KP_2) "२")
110   ((KP_3) "३")
111   ((KP_4) "४")
112   ((KP_5) "५")
113   ((KP_6) "६")
114   ((KP_7) "७")
115   ((KP_8) "८")
116   ((KP_9) "९")
117   ((S-\ ) "‌")
118   ((C-@) "‍"))
119
120  (dependent
121   ("a" (delete @-) "")
122   ("A" (delete @-) "ा")
123   ("i" (delete @-) "ि")
124   ("I" (delete @-) "ी")
125   ("u" (delete @-) "ु")
126   ("U" (delete @-) "ू")
127   ("R" (delete @-) "ृ")
128   ("RR" (delete @-) "ॄ")
129   ("e" (delete @-) "े")
130   ("ai" (delete @-) "ै")
131   ("o" (delete @-) "ो")
132   ("au" (delete @-) "ौ")
133   ("lR" (delete @-) "ॢ")
134   ("lRR" (delete @-) "ॣ"))
135
136  (return
137   ((Return)))
138
139  (backspace
140   ((BackSpace) (undo))))
141
142 (state
143  (init
144   (starter (pushback 1) (shift intermediate)))
145
146  (intermediate
147   (consonant (shift second))
148   (independent (shift init))
149   (backspace)
150   (return (shift init)))
151
152  (second
153   (consonant)
154   (dependent (shift init))
155   (backspace)
156   (return (shift init))))
157
158 ;; Local Variables:
159 ;; coding: utf-8
160 ;; mode: emacs-lisp
161 ;; End: