Remove the addional space character after ొ in ("t" "ొ ") which
[m17n/m17n-contrib.git] / im / te-apple.mim
1 ;;
2 ;;        Input Method for Telugu Apple Keyboard Layout
3 ;;
4 ;;    Copyright (c) 2006, Chaitanya Kamisetty <chaitanya@atc.tcs.co.in>
5 ;;
6 ;;    This file is part of the m17n contrib; a sub-part of the m17n
7 ;;    library.
8 ;;
9 ;;    This library is free software; you can redistribute it and/or
10 ;;    modify it under the terms of the GNU Lesser General Public
11 ;;    License as published by the Free Software Foundation; either
12 ;;    version 2.1 of the License, or (at your option) any later version.
13 ;;
14 ;;    This 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 this library; if not, write to the Free Software
21 ;;    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
22 ;;
23
24 (input-method te apple)
25
26 (description "Apple keyboard layout for Telugu")
27
28 (title "తెలుగు")
29
30 (map
31    (independent
32         ("0" "0")
33         ("1" "1")
34         ("2" "2")
35         ("3" "3")
36         ("4" "4")
37         ("5" "5")
38         ("6" "6")
39         ("7" "7")
40         ("8" "8")
41         ("9" "9")
42         ("@" "'")
43         ("#" "%")
44         ("\$"   "్పు")
45         ("%"    "్ర")
46         ("^" "-")
47         ("&" "|")
48         ("*" "`")
49         ("(" "(")
50         (")" ")")
51         ("-" "×")
52         ("_" "÷")
53         ("=" "=")
54         ("+" "+")
55         ("\\" "ః")
56         ("|" "ఁ")
57         ("}" "!")
58         ("I" "/")
59         ("<" ";")
60         ("." ".")
61         (">" "?")
62         ("g" "ం")
63         ("G" ":")
64         ("Q" "క్ష్మి")
65         ("O" "స్త్ర")
66         ("P" "ష్ట్ర")
67         ("{" "క్ష్మ")
68         ("N" "క్ష్మీ")
69         ("`" "_")
70         ("h" "్")
71         ("H" "్")
72         ("q" "అ")
73         ("e" "ఆ")
74         ("r" "ఇ")
75         ("w" "ఈ")
76         ("i" "ఉ")
77         ("p" "ఊ")
78         ("W" "ఋ")
79         ("E" "ౠ")
80         ("u" "ఎ")
81         ("o" "ఏ")
82         ("[" "ఐ")
83         ("t" "ఒ")
84         ("y" "ఓ")
85         ("]" "ఔ")
86         )
87    (dependent_vowels
88         ("e"    "ా")
89         ("r"    "ి")
90         ("w"    "ీ")
91         ("i"    "ు")
92         ("p"    "ూ")
93         ("W"    "ృ")
94         ("E"    "ౄ")
95         ("u"    "ె")
96         ("o"    "ే")
97         ("["    "ై")
98         ("t"    "ొ")
99         ("y"    "ో")
100         ("]"    "ౌ")
101         ("H"  "్")
102         )
103
104    (a_matra
105         ("q" "")
106    )
107
108    (consonants
109         ("j" "క")
110         ("J" "ఖ")
111         ("x" "గ")
112         ("X" "ఘ")
113         ("R" "ఙ")
114         ("m" "చ")
115         ("M" "ఛ")
116         ("/" "జ")
117         ("?" "ఝ")
118         ("T" "ఞ")
119         ("z" "ట")
120         ("Z" "ఠ")
121         ("c" "డ")
122         ("C" "ఢ")
123         ("L" "ణ")
124         ("s" "త")
125         ("S" "థ")
126         ("d" "ద")
127         ("D" "ధ")
128         ("l" "న")
129         (";" "ప")
130         (":" "ఫ")
131         ("v" "బ")
132         ("V" "భ")
133         ("b" "మ")
134         ("n" "య")
135         ("k" "ర")
136         ("a" "ల")
137         ("f" "వ")
138         ("F" "శ")
139         ("\"" "ష")
140         ("'" "స")
141         ("B" "హ")
142         ("A" "ళ")
143         ("K" "ఱ")
144         ("Y" "క్ష")
145         ("U" "శ్రీ")
146         )
147
148         ;;consonants occuring after a halant 
149    (halant_consonants
150         ("j" (delete @-) "క")
151         ("J" (delete @-) "ఖ")
152         ("x" (delete @-) "గ")
153         ("X" (delete @-) "ఘ")
154         ("R" (delete @-) "ఙ")
155         ("m" (delete @-) "చ")
156         ("M" (delete @-) "ఛ")
157         ("/" (delete @-) "జ")
158         ("?" (delete @-) "ఝ")
159         ("T" (delete @-) "ఞ")
160         ("z" (delete @-) "ట")
161         ("Z" (delete @-) "ఠ")
162         ("c" (delete @-) "డ")
163         ("C" (delete @-) "ఢ")
164         ("L" (delete @-) "ణ")
165         ("s" (delete @-) "త")
166         ("S" (delete @-) "థ")
167         ("d" (delete @-) "ద")
168         ("D" (delete @-) "ధ")
169         ("l" (delete @-) "న")
170         (";" (delete @-) "ప")
171         (":" (delete @-) "ఫ")
172         ("v" (delete @-) "బ")
173         ("V" (delete @-) "భ")
174         ("b" (delete @-) "మ")
175         ("n" (delete @-) "య")
176         ("k" (delete @-) "ర")
177         ("a" (delete @-) "ల")
178         ("f" (delete @-) "వ")
179         ("F" (delete @-) "శ")
180         ("\"" (delete @-)  "ష")
181         ("'" (delete @-) "స")
182         ("B" (delete @-) "హ")
183         ("A" (delete @-) "ళ")
184         ("K" (delete @-) "ఱ")
185         ("Y" (delete @-) "క్ష")
186         ("U" (delete @-) "శ్రీ")
187    )
188
189    ;; halant occuring after a dependent vowel
190    (halant_after_vowel
191         ("h" (delete @-) "్" )
192         ("H" (delete @-) "్" )
193    )
194
195    (halant
196         ("h" "్" )
197         ("H" "్" )
198    )
199
200  ; m17n stuff
201  (return
202   ((Return)))
203
204   (backspace
205   ((BackSpace) (undo)))
206 )
207
208 (state
209     (init (consonants (shift first))
210           (independent)
211     )
212     (first 
213         (a_matra (shift second_a))
214         (dependent_vowels (set current_vowel @-) (shift second_b))
215         (halant (shift third_a))
216         (backspace)
217     )
218     ;;consonat+a matra  
219     (second_a
220         (halant (shift third_a))
221         (backspace)
222     )
223     ;;state when consonant+dependent vowel occurs
224     (second_b
225         ;;move the dependent vowel to the end and add halant to the base consonant
226         (halant_after_vowel (insert current_vowel) (shift fourth))
227         (consonants (set current_vowel 0) (shift first))
228         (backspace)
229     )
230     ;;consonant when followed by halant
231     (third_a
232         (consonants (shift third_b))
233         (backspace)
234     )   
235     ;;state when cosonant+halant+consonant occurs
236     ;;further composition of halant+consonant is achieved with third_a and third_b states
237     ;;this is required as dependent and independent vowels have same keys and have to be
238     ;;identified  by the context 
239     (third_b
240         (halant (shift third_a))
241         (consonants (shift first))
242         (backspace)
243     )   
244     (fourth 
245         ;;delete the dependent vowel and add at the end after the consonant
246         (halant_consonants (insert current_vowel) (shift second_b))
247         (backspace)
248     )
249 )