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