Update FSF postal address.
[m17n/m17n-contrib.git] / im / hi-typewriter.mim
1 ;; hi-typewriter.mim -- Devanagari input method with typewriter method
2 ;; Copyright (C) 2005
3 ;;   National Institute of Advanced Industrial Science and Technology (AIST)
4 ;;   Registration Number H15PRO112
5
6 ;; This file is part of the m17n contrib; 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 hi typewriter)
25
26 (description "Hindi input method with `typewriter' method.
27 Still experimental.
28 ")
29
30 (title "क")
31
32 (map
33  (consonant
34   ("!" ?ऍ)
35   ("+" ?ऋ)
36   ("Q" ?औ)
37   ("W" ?ऐ)
38   ("E" ?आ)
39   ("R" ?ई)
40   ("T" ?ऊ)
41   ("Y" ?भ)
42   ("y" ?ब)
43   ("U" ?ङ)
44   ("u" ?ह)
45   ("I" ?घ)
46   ("i" ?ग)
47   ("O" ?ध)
48   ("o" ?द)
49   ("P" ?झ)
50   ("p" ?ज)
51   ("{" ?ढ)
52   ("[" ?ड)
53   ("}" ?ञ)
54   ("A" ?ओ)
55   ("S" ?ए)
56   ("D" ?अ)
57   ("F" ?इ)
58   ("G" ?उ)
59   ("H" ?फ)
60   ("h" ?प)
61   ("J" ?ऱ)
62   ("j" ?र)
63   ("K" ?ख)
64   ("k" ?क)
65   ("L" ?थ)
66   ("l" ?त)
67   (":" ?छ)
68   (";" ?च)
69   ("\"" ?ठ)
70   ("'" ?ट)
71   ("|" ?ऑ)
72   ("~" ?ऒ)
73   ("Z" ?ऎ)
74   ("C" ?ण)
75   ("c" ?म)
76   ("V" ?ऩ)
77   ("v" ?न)
78   ("B" ?ऴ)
79   ("b" ?व)
80   ("N" ?ळ)
81   ("n" ?ल)
82   ("M" ?श)
83   ("m" ?स)
84   ("<" ?ष)
85   ("/" ?य))
86  (halant
87   ("d" ?्))
88  (vowel-I
89   ("f" ?ि))
90  (else
91   ("1" ?१)
92   ("@" ?ॅ)
93   ("2" ?२)
94   ("#" ?#)
95   ("3" ?३)
96   ("$" ?$)
97   ("4" ?४)
98   ("5" ?५)
99   ("6" ?६)
100   ("7" ?७)
101   ("8" ?८)
102   ("(" ?\()
103   ("9" ?९)
104   (")" ?\))
105   ("0" ?०)
106   ("_" ?ः)
107   ("-" ?-)
108   ("=" ?ृ)
109   ("q" ?ौ)
110   ("w" ?ै)
111   ("e" ?ा)
112   ("r" ?ी)
113   ("t" ?ू)
114   ("]" ?़)
115   ("a" ?ो)
116   ("s" ?े)
117   ("g" ?ु)
118   ("\\" ?ॉ)
119   ("`" ?ॊ)
120   ("z" ?ॆ)
121   ("X" ?ँ)
122   ("x" ?ं)
123   ("," ?,)
124   (">" ?।)
125   ("." ?.)
126   ("?" ?य़)))
127
128 (state
129  (init
130   (consonant)
131   (halant)
132   (else)
133   (vowel-I (shift after-vowel-I)))
134
135  (after-vowel-I
136   (consonant
137    ;; The current preedit is "IC".  Reorder it to "CI".
138    (move @<) (delete @+) (move @>) (insert "ि")
139    ;; Keep on reading the following [HC]* sequence.
140    (shift after-consonant))
141   (vowel-I
142    ;; Delete the lastly inserted I and rehandle it in `init' state.
143    (delete @-) (pushback 1) (shift init))
144   (nil (shift init)))
145
146  (after-consonant
147   (halant
148    ;; The current preedit is "C[HC]*IH".  Reorder it to "C[HC]*HI".
149    (move @-) (delete @-) (move @>) (insert "ि")
150    ;; Keep on reading the following C[HC]* sequence.
151    (shift after-consonant-halant)))
152
153  (after-consonant-halant
154   (consonant
155    ;; The current preedit is "C[HC]*HIC".  Reorder it to "C[HC]+I".
156    (move @-) (delete @-) (move @>) (insert "ि")
157    ;; Keep on reading the following [HC]* sequence.
158    (shift after-consonant))))