-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathkn-optitransv2.mim
400 lines (361 loc) · 9.5 KB
/
kn-optitransv2.mim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
;; kn-optitransv2.mim -- Kannada input method.
;; Copyright (C) 2015 Vishvas Vasuki <[email protected]>
;; This file is part of the m17n database; a sub-part of the m17n
;; library.
;; The m17n library is free software; you can redistribute it and/or
;; modify it under the terms of the GNU Lesser General Public License
;; as published by the Free Software Foundation; either version 2.1 of
;; the License, or (at your option) any later version.
;; The m17n library 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
;; Lesser General Public License for more details.
;; 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., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
(input-method kn optitransv2)
(description "Kannada input method by the OPTITRANS
transliteration system.
0. A major deviation from other transliteration systems like ITRANS and HK
is that latin consonants are mapped to the correpsonding devanAgarI consonant *followed by the
vowel a*. For example, k maps to ಕ, not ಕ್.
1. panchama-varNa-s of vyanjana-varga-s
nnk->ಙ್ಕ, nnkh->ಙ್ಖ, nng->ಙ್ಗ, nngh->ಙ್ಘ
nnch->ಞ್ಚ, nnCh->ಞ್ಛ, nnc->ಞ್ಚ, nnC->ಞ್ಛ,
2. Any common consonant, typed twice, yields that consonant with the virAma. So, nn yields ನ್. The rationale is that a repeated consonant such as ನನ and ದದ is far less common than the consonants with a virAma, such as ನ್ and ದ್.
3. The rare character sequences that conflict with shortcuts for more frequently occuring strings can be typed using the "commit key" - (Ctrl + Shift + Enter), or with the use of the arrow key.
For example, sh yields ಶ. But if one wanted to type ಸಹ, one can type: s<Commit key>h or s<left arrow, right arrow>h.
Examples:
- Avoiding unnecessary 'a'-s.
- kml or kamala - ಕಮಲ
- Typing vyanjana-s with a virAma
- sikkt - ಸಿಕ್ತ
- sik;t - ಸಿಕ್ತ
- Shortcut for typing panchama-s/ anunAsika-s of vargIya-vyanjana-s
- shankara or shnnkr- ಶಙ್ಕರ।
- snncit - ಸಞ್ಚಿತ
- shann karoti - ಶಙ್ ಕರೋತಿ।
- Overriding shortcuts
- pashyann karoti - ಪಶ್ಯನ್ ಕರೋತಿ। (Note two spaces here. Avoids ಪಶ್ಯಙ್ ಕರೋತಿ )
- s<Commit key>h or s<left arrow, right arrow>h or sah or saha - ಸಹ (Avoids ಶ)
The motivation behind additions made to the basic ITRANS scheme
is described in https://sites.google.com/site/sanskritcode/optitrans,
along with a tabulated comparison with several other
transliteration schemes.
Note: You can use many symbols defined in lsymbol.mim.
Also, see: http://en.wikipedia.org/wiki/Devanagari_transliteration.")
(title "ಕ")
(map
(non_init_keys
(".") (";") ("~") ("$")
("A") ("B") ("C") ("D") ("E") ("F") ("G") ("H") ("I") ("J") ("K") ("L")
("M") ("N") ("O") ("P") ("Q") ("R") ("S") ("T") ("U") ("V") ("W") ("X") ("Y") ("Z")
("a") ("b") ("c") ("d") ("e") ("f") ("g") ("h") ("i")
("j") ("k") ("l") ("m") ("n") ("o") ("p") ("q") ("r")
("s") ("t") ("u") ("v") ("w") ("x") ("y") ("z")
)
(consonant
("k" "ಕ")
("kh" "ಖ")
("K" "ಖ")
("g" "ಗ")
("gh" "ಘ")
("G" "ಘ")
(".k" "ಕ಼")
(".kh" "ಖ಼")
(".K" "ಖ಼")
(".g" "ಗ಼")
("~N" "ಙ")
("N^" "ಙ")
("ch" "ಚ")
("Ch" "ಛ")
("c" "ಚ")
("C" "ಛ")
("chh" "ಛ")
("j" "ಜ")
("jh" "ಝ")
("J" "ಝ")
("~n" "ಞ")
("JN" "ಞ")
("T" "ಟ")
("Th" "ಠ")
("D" "ಡ")
("Dh" "ಢ")
(".D" "ಡ಼")
(".Dh" "ಢ಼")
("N" "ಣ")
("t" "ತ")
("th" "ಥ")
("d" "ದ")
("dh" "ಧ")
("n" "ನ")
("p" "ಪ")
("ph" "ಫ")
("P" "ಫ")
(".ph" "ಫ಼")
("f" "ಫ಼")
("b" "ಬ")
("bh" "ಭ")
("B" "ಭ")
("m" "ಮ")
("y" "ಯ")
("r" "ರ")
("l" "ಲ")
("L" "ಳ")
("v" "ವ")
("w" "ವ")
("sh" "ಶ")
("Z" "ज़")
(".j" "ಜ಼")
("z" "ಶ")
("S" "ಷ")
("Sh" "ಷ")
("shh" "ಷ")
("s" "ಸ")
("h" "ಹ")
("ttr" "ತ್ರ")
("jjn" "ಜ್ಞ")
("j~n" "ಜ್ಞ")
("x" "ಕ್ಷ")
; nn shortcuts
("nnk" "ಙ್" (pushback 1))
("nnx" "ಙ್" (pushback 1))
("nnkh" "ಙ್" (pushback 1))
("nnK" "ಙ್" (pushback 1))
("nng" "ಙ್" (pushback 1))
("nngh" "ಙ್" (pushback 1))
("nnG" "ಙ್" (pushback 1))
("nnch" "ಞ್" (pushback 1))
("nnCh" "ಞ್" (pushback 1))
("nnc" "ಞ್" (pushback 1))
("nnC" "ಞ್" (pushback 1))
("nnj" "ಞ್" (pushback 1))
("nnjh" "ಞ್" (pushback 1))
("nnJ" "ಞ್" (pushback 1))
("nnT" "ಣ್" (pushback 1))
("nnTh" "ಣ್" (pushback 1))
("nnD" "ಣ್" (pushback 1))
("nnDh" "ಣ್" (pushback 1))
) ; consonant ends
(consonant_with_space
("nn " "ನ್ ")
("nn " "ನ್ ") ; handle the case where the transformation to ಙ್ etc.. is not desired, even when followed by a character like k.
("nn k" "ಙ್ " (pushback 1))
("nn x" "ಙ್ " (pushback 1))
("nn K" "ಙ್ " (pushback 1))
("nn g" "ಙ್ " (pushback 1))
("nn G" "ಙ್ " (pushback 1))
("nn c" "ಞ್ " (pushback 1))
("nn C" "ಞ್ " (pushback 1))
("nn j" "ಞ್ " (pushback 1))
("nn J" "ಞ್ " (pushback 1))
("nn T" "ಣ್ " (pushback 1))
("nn D" "ಣ್ " (pushback 1))
) ; consonant_with_space ends
(consonant_with_viraama
; virAma shortcuts
("kk" "ಕ್")
("khkh" "ಖ್")
("KK" "ಖ್")
("gg" "ಗ್")
("ghgh" "ಘ್")
("GG" "ಘ್")
("~N~N" "ಙ್")
("chch" "ಚ್")
("ChCh" "ಛ್")
("cc" "ಚ್")
("CC" "ಛ್")
("jj" "ಜ್")
("jhjh" "ಝ್")
("JJ" "ಝ್")
("~n~n" "ಞ್")
("JNJN" "ಞ್")
("TT" "ಟ್")
("ThTh" "ಠ್")
("DD" "ಡ್")
("DhDh" "ಢ್")
("NN" "ಣ್")
("tt" "ತ್")
("thth" "ಥ್")
("dd" "ದ್")
("dhdh" "ಧ್")
("nn" "ನ್")
("pp" "ಪ್")
("phph" "ಫ್")
("PP" "ಫ್")
("FF" "ಫ़್")
("bb" "ಬ್")
("bhbh" "ಭ್")
("BB" "ಭ್")
("mm" "ಮ್")
("M" "ಂ")
("MM" "ಮ್")
("yy" "ಯ್")
("rr" "ರ್")
("ll" "ಲ್")
("LL" "ಳ್")
("vv" "ವ್")
("shsh" "ಶ್")
("zz" "ಶ್")
("SS" "ಷ್")
("ShSh" "ಷ್")
("ss" "ಸ್")
("hh" "ಹ್")
("xx" "ಕ್ಷ್")
) ; consonant_with_viraama ends
(independent
("a" "ಅ")
("aa" "ಆ")
("A" "ಆ")
("i" "ಇ")
("ii" "ಈ")
("I" "ಈ")
("u" "ಉ")
("uu" "ಊ")
("U" "ಊ")
("R" "ಋ")
("RRi" "ಋ")
("R^i" "ಋ")
("LLi" "ಌ")
("L^i" "ಌ")
("e" "ಎ")
("ee" "ಏ")
("E" "ಏ")
("ai" "ಐ")
("o" "ಒ")
("oo" "ಓ")
("O" "ಓ")
("au" "ಔ")
("RRI" "ೠ")
("RR" "ೠ")
("R^I" "ೠ")
("LLI" "ೡ")
("L^I" "ೡ")
("AUM" "ಓಂ")
("OM" "ಓಂ")
(".a" "ಽ")
((S-\ ) "")
((C-@) "")) ; independent ends
(ayogavAhas
; Visarga and the like may appear after a vowel. So, they aren't expected just in the dependent state.
(".N" "ँ") ; TODO: Change to kn glyph.
("M" "ಂ")
("H" "ಃ")
("HH" "ᳲ") ; ardhavisarga - often used to denote jihvAmUlIya and upadhmAnIya.
) ; ayogavAhas end
(ayogavAhas_with_consonant
; jihvAmUlIya and upadhmAnIya shortcuts
("Hk" "ೱ" (pushback 1))
("Hp" "ೲ" (pushback 1))
("Hkh" "ೱ" (pushback 1))
("Hph" "ೲ" (pushback 1))
("HK" "ೱ" (pushback 1))
("HP" "ೲ" (pushback 1))
) ; ayogavAhas_with_consonant ends
(digit
("0" "೦")
("1" "೧")
("2" "೨")
("3" "೩")
("4" "೪")
("5" "೫")
("6" "೬")
("7" "೭")
("8" "೮")
("9" "೯")
((KP_0) "೦")
((KP_1) "೧")
((KP_2) "೨")
((KP_3) "೩")
((KP_4) "೪")
((KP_5) "೫")
((KP_6) "೬")
((KP_7) "೭")
((KP_8) "೮")
((KP_9) "೯")) ; digit ends
(udattta
("_" "॒")
("''" "॑"))
(dependent
("a" "")
("aa" "ಾ")
("A" "ಾ")
("i" "ಿ")
("ii" "ೀ")
("I" "ೀ")
("u" "ು")
("uu" "ೂ")
("U" "ೂ")
("R" "ೃ")
("RRi" "ೃ")
("R^i" "ೃ")
("LLi" "ೢ")
("L^i" "ೢ")
("e" "ೆ")
("E" "ೇ")
("ee" "ೇ")
("ai" "ೈ")
("o" "ೊ")
("O" "ೋ")
("oo" "ೋ")
("au" "ೌ")
("RR" "ೄ")
("RRI" "ೄ")
("R^I" "ೄ")
("LLI" "ೄ")
("L^I" "ೄ")
(";" "್")
(".h" "್")
) ; dependent end
(dot_start
(".." "।")
(".," "॥")
(". " "।" (pushback 1))
((?. Return) "।" (pushback 1))
((?. Tab) "।" (pushback 1))
(".(" "।" (pushback 1))
(".)" "।" (pushback 1))
(".[" "।" (pushback 1))
(".]" "।" (pushback 1))
(".{" "।" (pushback 1))
(".}" "।" (pushback 1))
(".'" "।" (pushback 1))
(".\"" "।" (pushback 1))) ; dot_start ends
(commit-key
((S-C-Return)))
(backspace
((BackSpace) (undo)))
) ; map ends
(state
(state_init
(non_init_keys (pushback 1) (shift state_indic_letter))
(udattta)
(digit)
(commit-key)
)
(state_indic_letter
(consonant (shift state_consonant_pressed))
(ayogavAhas_with_consonant (shift state_consonant_pressed))
(consonant_with_space (shift state_init))
(consonant_with_viraama (shift state_init))
(independent (shift state_init))
(dot_start (shift state_init))
(backspace)
(ayogavAhas (shift state_init))
)
(state_consonant_pressed
(consonant)
(ayogavAhas_with_consonant)
(consonant_with_space (shift state_init))
(consonant_with_viraama (shift state_init))
(dependent (shift state_init))
(dot_start (shift state_init))
(backspace)
(ayogavAhas (shift state_init))
)
) ; state ends
;; Local Variables:
;; coding: utf-8
;; mode: emacs-lisp
;; End: