Pāli Input Method on Ubuntu Linux


The blog post [1] discusses how to create an input method for romanized Pāli, but it doesn't give references for tweaking the mim file, i.e., tweaking the input method. Also, the blog post [1] seems to come from the thread [2].

The blog post is good, but I need another feature that when I type the key combination "alt + a", ā will show up. The same for other vowels. After some investigation, removing Sanskrit part, and making necessary modifications, the following is my mim file (tested on Ubuntu 12.04).

pali-translit.mim | repository | view raw
 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
;; pali-translit.mim
;;
;; Input method for Pali transliteration using the ITRANS scheme.

(input-method t pali-translit)

(title "pali-translit")

(map
(trans

("aa" "ā")
((A-a) "ā")
("AA" "Ā")
((A-A) "Ā")
("ii" "ī")
((A-i) "ī")
("II" "Ī")
((A-I) "Ī")
("uu" "ū")
((A-u) "ū")
("UU" "Ū")
((A-U) "Ū")
(".l" "ḷ")
(".L" "Ḷ")
(".M" "ṁ")
(".m" "ṃ")
(";n" "ṅ")
(";N" "Ṅ")
("~n" "ñ")
("~N" "Ñ")
(".t" "ṭ")
(".T" "Ṭ")
(".d" "ḍ")
(".D" "Ḍ")
(".n" "ṇ")
(".N" "Ṇ")
))

(state
(init
(trans)))

References:

[1](1, 2) How to use iBus to input Romanized Pali and Sanskrit in Ubuntu
[2]Sanskrit input (Devanagari and transliteration)
[3]Data format of the m17n database
[4]ITRANS