1 ;; ko-han2.mim -- Input method for Korean Hangul
2 ;; Copyright (C) 2003, 2004
3 ;; National Institute of Advanced Industrial Science and Technology (AIST)
4 ;; Registration Number H15PRO112
6 ;; This file is part of the m17n database; a sub-part of the m17n
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.
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.
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., 59 Temple Place, Suite 330, Boston, MA
26 ;;; Input method for Korean Hangul using Hangul keyboard layout.
32 ;; Convert Jamo sequence LV[T] into a precomposed character.
33 ;; See the Unicode Standard Version 3.0, Section 3.11.
35 ((set LIndex L) (sub LIndex 0x1100)
36 (set VIndex V) (sub VIndex 0x1161)
37 (set TIndex T) (sub TIndex 0x11A7)
38 ;; S = (LIndex * VCount + Vindex) * TCount + TIndex + SBase
44 (add S 0xAC00) ;; SBase
50 ("q") ("Q") ("w") ("W") ("e") ("E") ("r") ("R") ("t") ("T")
51 ("a") ("s") ("S") ("d") ("D") ("f") ("F") ("g") ("G")
52 ("z") ("x") ("c") ("C") ("v"))
55 ;; Set L1 to CHOSEONG, T to JONGSEONG.
56 ("r" (set L1 ?ᄀ) (set T ?ᆨ) ?ㄱ (compose))
57 ("R" (set L1 ?ᄁ) (set T ?ᆩ) ?ㄲ (compose))
58 ("s" (set L1 ?ᄂ) (set T ?ᆫ) ?ㄴ (compose))
59 ("e" (set L1 ?ᄃ) (set T ?ᆮ) ?ㄷ (compose))
60 ("f" (set L1 ?ᄅ) (set T ?ᆯ) ?ㄹ (compose))
61 ("a" (set L1 ?ᄆ) (set T ?ᆷ) ?ㅁ (compose))
62 ("q" (set L1 ?ᄇ) (set T ?ᆸ) ?ㅂ (compose))
63 ("t" (set L1 ?ᄉ) (set T ?ᆺ) ?ㅅ (compose))
64 ("T" (set L1 ?ᄊ) (set T ?ᆻ) ?ㅆ (compose))
65 ("d" (set L1 ?ᄋ) (set T ?ᆼ) ?ㅇ (compose))
66 ("w" (set L1 ?ᄌ) (set T ?ᆽ) ?ㅈ (compose))
67 ("c" (set L1 ?ᄎ) (set T ?ᆾ) ?ㅊ (compose))
68 ("z" (set L1 ?ᄏ) (set T ?ᆿ) ?ㅋ (compose))
69 ("x" (set L1 ?ᄐ) (set T ?ᇀ) ?ㅌ (compose))
70 ("v" (set L1 ?ᄑ) (set T ?ᇁ) ?ㅍ (compose))
71 ("g" (set L1 ?ᄒ) (set T ?ᇂ) ?ㅎ (compose))
72 ("sr" (set L1 ?ᄓ) (set T ?ᇅ) ?ᄓ (compose))
73 ("se" (set L1 ?ᄕ) (set T ?ᇆ) ?ㅦ (compose))
74 ("er" (set L1 ?ᄗ) (set T ?ᇊ) ?ᄗ (compose))
75 ("fs" (set L1 ?ᄘ) (set T ?ᇍ) ?ᄘ (compose))
76 ("F" (set L1 ?ᄙ) (set T ?ᇐ) ?ᄙ (compose))
77 ("fg" (set L1 ?ᄚ) (set T ?ᆶ) ?ㅀ (compose))
78 ("aq" (set L1 ?ᄜ) (set T ?ᇜ) ?ㅮ (compose))
79 ("ad" (set L1 ?ᄝ) (set T ?ᇢ) ?ㅱ (compose))
80 ("qt" (set L1 ?ᄡ) (set T ?ᆹ) ?ㅄ (compose))
81 ("qv" (set L1 ?ᄪ) (set T ?ᇤ) ?ᄪ (compose))
82 ("qd" (set L1 ?ᄫ) (set T ?ᇦ) ?ㅸ (compose))
83 ("tr" (set L1 ?ᄭ) (set T ?ᇧ) ?ㅺ (compose))
84 ("te" (set L1 ?ᄯ) (set T ?ᇨ) ?ㅼ (compose))
85 ("tf" (set L1 ?ᄰ) (set T ?ᇩ) ?ᄰ (compose))
86 ("tq" (set L1 ?ᄲ) (set T ?ᇪ) ?ㅽ (compose))
87 ("t/" (set L1 ?ᅀ) (set T ?ᇫ) ?ㅿ (compose))
88 ("dr" (set L1 ?ᅁ) (set T ?ᇬ) ?ᅁ (compose))
89 ("dt" (set L1 ?ᅅ) (set T ?ᇱ) ?ㆂ (compose))
90 ("dt/" (set L1 ?ᅆ) (set T ?ᇲ) ?ㆃ (compose))
91 ("d/" (set L1 ?ᅌ) (set T ?ᇰ) ?ㆁ (compose))
92 ("vq" (set L1 ?ᅖ) (set T ?ᇳ) ?ᅖ (compose))
93 ("vd" (set L1 ?ᅗ) (set T ?ᇴ) ?ㆄ (compose))
94 ("g/" (set L1 ?ᅙ) (set T ?ᇹ) ?ㆆ (compose)))
107 ("qtr" (set L ?ᄢ) ?ㅴ)
108 ("qte" (set L ?ᄣ) ?ㅵ)
109 ("qtq" (set L ?ᄤ) ?ᄤ)
110 ("qtt" (set L ?ᄥ) ?ᄥ)
111 ("qtw" (set L ?ᄦ) ?ᄦ)
118 ("tqr" (set L ?ᄳ) ?ᄳ)
129 ("tt/" (set L ?ᄾ) ?ᄾ)
130 ("TT/'" (set L ?ᄿ) ?ᄿ)
142 ("ww/" (set L ?ᅐ) ?ᅐ)
143 ("WW/" (set L ?ᅑ) ?ᅑ)
147 ("cc/" (set L ?ᅕ) ?ᅕ)
152 ("y") ("u") ("i") ("o") ("p") ("O") ("P")
153 ("h") ("j") ("J") ("k") ("K") ("l")
157 ;; Set V to JUNGSEONG.
158 ("J" (set V ?ᅠ) ?ᅠ (compose))
159 ("k" (set V ?ᅡ) ?ㅏ (compose))
160 ("o" (set V ?ᅢ) ?ㅐ (compose))
161 ("i" (set V ?ᅣ) ?ㅑ (compose))
162 ("O" (set V ?ᅤ) ?ㅒ (compose))
163 ("j" (set V ?ᅥ) ?ㅓ (compose))
164 ("p" (set V ?ᅦ) ?ㅔ (compose))
165 ("u" (set V ?ᅧ) ?ㅕ (compose))
166 ("P" (set V ?ᅨ) ?ㅖ (compose))
167 ("h" (set V ?ᅩ) ?ㅗ (compose))
168 ("hk" (set V ?ᅪ) ?ㅘ (compose))
169 ("ho" (set V ?ᅫ) ?ㅙ (compose))
170 ("hl" (set V ?ᅬ) ?ㅚ (compose))
171 ("y" (set V ?ᅭ) ?ㅛ (compose))
172 ("n" (set V ?ᅮ) ?ㅜ (compose))
173 ("nj" (set V ?ᅯ) ?ㅝ (compose))
174 ("np" (set V ?ᅰ) ?ㅞ (compose))
175 ("nl" (set V ?ᅱ) ?ㅟ (compose))
176 ("b" (set V ?ᅲ) ?ㅠ (compose))
177 ("m" (set V ?ᅳ) ?ㅡ (compose))
178 ("ml" (set V ?ᅴ) ?ㅢ (compose))
179 ("l" (set V ?ᅵ) ?ㅣ (compose))
180 ("kh" (set V ?ᅶ) ?ᅶ (compose))
181 ("kn" (set V ?ᅷ) ?ᅷ (compose))
182 ("ih" (set V ?ᅸ) ?ᅸ (compose))
183 ("iy" (set V ?ᅹ) ?ᅹ (compose))
184 ("jh" (set V ?ᅺ) ?ᅺ (compose))
185 ("jn" (set V ?ᅻ) ?ᅻ (compose))
186 ("jm" (set V ?ᅼ) ?ᅼ (compose))
187 ("uh" (set V ?ᅽ) ?ᅽ (compose))
188 ("un" (set V ?ᅾ) ?ᅾ (compose))
189 ("hj" (set V ?ᅿ) ?ᅿ (compose))
190 ("hp" (set V ?ᆀ) ?ᆀ (compose))
191 ("hP" (set V ?ᆁ) ?ᆁ (compose))
192 ("hh" (set V ?ᆂ) ?ᆂ (compose))
193 ("hn" (set V ?ᆃ) ?ᆃ (compose))
194 ("yi" (set V ?ᆄ) ?ㆇ (compose))
195 ("yO" (set V ?ᆅ) ?ㆈ (compose))
196 ("yu" (set V ?ᆆ) ?ᆆ (compose))
197 ("yh" (set V ?ᆇ) ?ᆇ (compose))
198 ("yl" (set V ?ᆈ) ?ㆉ (compose))
199 ("nk" (set V ?ᆉ) ?ᆉ (compose))
200 ("no" (set V ?ᆊ) ?ᆊ (compose))
201 ("njm" (set V ?ᆋ) ?ᆋ (compose))
202 ("nu" (set V ?ᆌ) ?ᆌ (compose))
203 ("nn" (set V ?ᆍ) ?ᆍ (compose))
204 ("bk" (set V ?ᆎ) ?ᆎ (compose))
205 ("bj" (set V ?ᆏ) ?ᆏ (compose))
206 ("bp" (set V ?ᆐ) ?ᆐ (compose))
207 ("bu" (set V ?ᆑ) ?ㆊ (compose))
208 ("bP" (set V ?ᆒ) ?ㆋ (compose))
209 ("bn" (set V ?ᆓ) ?ᆓ (compose))
210 ("bl" (set V ?ᆔ) ?ㆌ (compose))
211 ("mn" (set V ?ᆕ) ?ᆕ (compose))
212 ("mm" (set V ?ᆖ) ?ᆖ (compose))
213 ("mln" (set V ?ᆗ) ?ᆗ (compose))
214 ("lk" (set V ?ᆘ) ?ᆘ (compose))
215 ("li" (set V ?ᆙ) ?ᆙ (compose))
216 ("lh" (set V ?ᆚ) ?ᆚ (compose))
217 ("ln" (set V ?ᆛ) ?ᆛ (compose))
218 ("lm" (set V ?ᆜ) ?ᆜ (compose))
219 ("lK" (set V ?ᆝ) ?ᆝ (compose))
220 ("K" (set V ?ᆞ) ?ᆞ (compose))
221 ("Kj" (set V ?ᆟ) ?ᆟ (compose))
222 ("Kn" (set V ?ᆠ) ?ᆠ (compose))
223 ("Kl" (set V ?ᆡ) ?ᆡ (compose))
224 ("KK" (set V ?ᆢ) ?ᆢ (compose)))
227 ;; Set T to JONGSEONG.
228 ("rt" (set T ?ᆪ) ?ㄳ (compose))
229 ("sw" (set T ?ᆬ) ?ᆬ (compose))
230 ("sg" (set T ?ᆭ) ?ᆭ (compose))
231 ("fr" (set T ?ᆰ) ?ㄺ (compose))
232 ("fa" (set T ?ᆱ) ?ㄻ (compose))
233 ("fq" (set T ?ᆲ) ?ㄼ (compose))
234 ("ft" (set T ?ᆳ) ?ㄽ (compose))
235 ("fx" (set T ?ᆴ) ?ㄾ (compose))
236 ("fv" (set T ?ᆵ) ?ㄿ (compose))
237 ("rf" (set T ?ᇃ) ?ᇃ (compose))
238 ("rtr" (set T ?ᇄ) ?ᇄ (compose))
239 ("st" (set T ?ᇇ) ?ㅧ (compose))
240 ("st/" (set T ?ᇈ) ?ㅨ (compose))
241 ("sx" (set T ?ᇉ) ?ᇉ (compose))
242 ("ef" (set T ?ᇋ) ?ᇋ (compose))
243 ("frt" (set T ?ᇌ) ?ᇌ (compose))
244 ("fe" (set T ?ᇎ) ?ㅪ (compose))
245 ("feg" (set T ?ᇏ) ?ᇏ (compose))
246 ("far" (set T ?ᇑ) ?ᇑ (compose))
247 ("fat" (set T ?ᇒ) ?ᇒ (compose))
248 ("fqt" (set T ?ᇓ) ?ㅫ (compose))
249 ("fqg" (set T ?ᇔ) ?ᇔ (compose))
250 ("fqd" (set T ?ᇕ) ?ᇕ (compose))
251 ("ftt" (set T ?ᇖ) ?ᇖ (compose))
252 ("ft/" (set T ?ᇗ) ?ㅬ (compose))
253 ("fz" (set T ?ᇘ) ?ᇘ (compose))
254 ("fmd" (set T ?ᇙ) ?ㅭ (compose))
255 ("ar" (set T ?ᇚ) ?ᇚ (compose))
256 ("af" (set T ?ᇛ) ?ᇛ (compose))
257 ("at" (set T ?ᇝ) ?ㅯ (compose))
258 ("aT" (set T ?ᇞ) ?ᇞ (compose))
259 ("at/" (set T ?ᇟ) ?ㅰ (compose))
260 ("ac" (set T ?ᇠ) ?ᇠ (compose))
261 ("ag" (set T ?ᇡ) ?ᇡ (compose))
262 ("qf" (set T ?ᇣ) ?ᇣ (compose))
263 ("qg" (set T ?ᇥ) ?ᇥ (compose))
264 ("dR" (set T ?ᇭ) ?ᇭ (compose))
265 ("dt/" (set T ?ᇮ) ?ㆃ (compose))
266 ("dz" (set T ?ᇯ) ?ᇯ (compose))
267 ("gs" (set T ?ᇵ) ?ᇵ (compose))
268 ("gf" (set T ?ᇶ) ?ᇶ (compose))
269 ("ga" (set T ?ᇷ) ?ᇷ (compose))
270 ("gq" (set T ?ᇸ) ?ᇸ (compose)))
273 ((BackSpace) (undo))))
277 (L-or-T (set L L1) (set T 0x11A7) (shift state-L))
278 (L (set T 0x11A7) (shift state-L))
286 (L-or-T (shift state-LVL-or-LVT))
290 (L-or-T-head (delete @<) (pushback 0) (set L 0) (shift state-fix-LVT))
291 (V-head (delete @<) (pushback 0) (set L 0) (shift state-fix-LV))
294 (L-or-T (set L L1) (set T 0x11A7) (shift state-fix-LVT-2))
295 (L (set T 0x11A7) (shift state-fix-LVT-2)))
297 (V (shift state-fix-LVT-3)))
299 (L-or-T (shift init)))
301 (L-or-T (set L L1) (set T 0x11A7) (shift state-fix-LV-2))
302 (L (set T 0x11A7) (shift state-fix-LV-2)))