/usr/share/m17n/ko-han2.mim is in m17n-db 1.6.3-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | ;; ko-han2.mim -- Input method for Korean Hangul
;; Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009, 2010
;; National Institute of Advanced Industrial Science and Technology (AIST)
;; Registration Number H15PRO112
;; 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.
;;; @if FOR_LATEX
;;; Hangul input method with 2-bul style.
;;; @endif
;;; @if FOR_HTML
;;; Hangul input method with 2벌식.
;;; @endif
;;; This input method uses this keyboard layout:
;;; @image html ko-han2.png "Keyboard Layout"
;;; @image latex ko-han2.eps "Keyboard Layout" width=\narrowwidth
;; ┌─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐
;; │1!│2@│3#│4$│5%│6^│7&│8*│9(│0)│-_│=+│`~│
;; └┬┴┬┴┬┴┬┴┬┴┬┴┬┴┬┴┬┴┬┴┬┴┬┴┬┘
;; │ㅃ│ㅉ│ㄸ│ㄲ│ㅆ│ │ │ │ㅒ│ㅖ│{ │} │
;; │ㅂ│ㅈ│ㄷ│ㄱ│ㅅ│ㅛ│ㅕ│ㅑ│ㅐ│ㅔ│[ │] │
;; └┬┴┬┴┬┴┬┴┬┴┬┴┬┴┬┴┬┴┬┴┬┴┬┴┐
;; │ㅁ│ㄴ│ㅇ│ㄹ│ㅎ│ㅗ│ㅓ│ㅏ│ㅣ│;:│'"│\|│
;; └┬┴┬┴┬┴┬┴┬┴┬┴┬┴┬┴┬┴┬┴┬┴─┘
;; │ㅋ│ㅌ│ㅊ│ㅍ│ㅠ│ㅜ│ㅡ│,<│.>│/?│
;; └─┴─┴─┴─┴─┴─┴─┴─┴─┴─┘
(input-method ko han2)
(description
"Hangul input method with 2벌식.
This input method uses this keyboard layout:
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
한글:ㄱㄲㄴㄷㄸㄹㅁㅂㅃㅅㅆㅇㅈㅉㅊㅋㅌㅍㅎㅏㅑㅓㅔㅖㅕㅗㅛㅜㅠㅡㅣㅐㅒ
")
(title "한2")
(macro
(compose
;; Convert Jamo sequence LV[T] into a precomposed character.
;; See the Unicode Standard Version 3.0, Section 3.11.
(> L 0
((set LIndex L) (sub LIndex 0x1100)
(set VIndex V) (sub VIndex 0x1161)
(set TIndex T) (sub TIndex 0x11A7)
;; S = (LIndex * VCount + Vindex) * TCount + TIndex + SBase
(set S LIndex)
(mul S 21) ;; VCount
(add S VIndex)
(mul S 28) ;; TCount
(add S TIndex)
(add S 0xAC00) ;; SBase
(delete @<)
(insert S)))))
(map
(L-or-T-head
("q") ("Q") ("w") ("W") ("e") ("E") ("r") ("R") ("t") ("T")
("a") ("s") ("S") ("d") ("D") ("f") ("F") ("g") ("G")
("z") ("x") ("c") ("C") ("v"))
(L-or-T
;; Set L1 to CHOSEONG, T to JONGSEONG.
("r" (set L1 ?ᄀ) (set T ?ᆨ) ?ㄱ (compose))
("R" (set L1 ?ᄁ) (set T ?ᆩ) ?ㄲ (compose))
("s" (set L1 ?ᄂ) (set T ?ᆫ) ?ㄴ (compose))
("e" (set L1 ?ᄃ) (set T ?ᆮ) ?ㄷ (compose))
("f" (set L1 ?ᄅ) (set T ?ᆯ) ?ㄹ (compose))
("a" (set L1 ?ᄆ) (set T ?ᆷ) ?ㅁ (compose))
("q" (set L1 ?ᄇ) (set T ?ᆸ) ?ㅂ (compose))
("t" (set L1 ?ᄉ) (set T ?ᆺ) ?ㅅ (compose))
("T" (set L1 ?ᄊ) (set T ?ᆻ) ?ㅆ (compose))
("d" (set L1 ?ᄋ) (set T ?ᆼ) ?ㅇ (compose))
("w" (set L1 ?ᄌ) (set T ?ᆽ) ?ㅈ (compose))
("c" (set L1 ?ᄎ) (set T ?ᆾ) ?ㅊ (compose))
("z" (set L1 ?ᄏ) (set T ?ᆿ) ?ㅋ (compose))
("x" (set L1 ?ᄐ) (set T ?ᇀ) ?ㅌ (compose))
("v" (set L1 ?ᄑ) (set T ?ᇁ) ?ㅍ (compose))
("g" (set L1 ?ᄒ) (set T ?ᇂ) ?ㅎ (compose))
;;("sr" (set L1 ?ᄓ) (set T ?ᇅ) ?ᄓ (compose))
;;("se" (set L1 ?ᄕ) (set T ?ᇆ) ?ㅦ (compose))
;;("er" (set L1 ?ᄗ) (set T ?ᇊ) ?ᄗ (compose))
;;("fs" (set L1 ?ᄘ) (set T ?ᇍ) ?ᄘ (compose))
;;("F" (set L1 ?ᄙ) (set T ?ᇐ) ?ᄙ (compose))
;;("fg" (set L1 ?ᄚ) (set T ?ᆶ) ?ㅀ (compose))
;;("aq" (set L1 ?ᄜ) (set T ?ᇜ) ?ㅮ (compose))
;;("ad" (set L1 ?ᄝ) (set T ?ᇢ) ?ㅱ (compose))
;;("qt" (set L1 ?ᄡ) (set T ?ᆹ) ?ㅄ (compose))
;;("qv" (set L1 ?ᄪ) (set T ?ᇤ) ?ᄪ (compose))
;;("qd" (set L1 ?ᄫ) (set T ?ᇦ) ?ㅸ (compose))
;;("tr" (set L1 ?ᄭ) (set T ?ᇧ) ?ㅺ (compose))
;;("te" (set L1 ?ᄯ) (set T ?ᇨ) ?ㅼ (compose))
;;("tf" (set L1 ?ᄰ) (set T ?ᇩ) ?ᄰ (compose))
;;("tq" (set L1 ?ᄲ) (set T ?ᇪ) ?ㅽ (compose))
;;("t/" (set L1 ?ᅀ) (set T ?ᇫ) ?ㅿ (compose))
;;("dr" (set L1 ?ᅁ) (set T ?ᇬ) ?ᅁ (compose))
;;("dt" (set L1 ?ᅅ) (set T ?ᇱ) ?ㆂ (compose))
;;("dt/" (set L1 ?ᅆ) (set T ?ᇲ) ?ㆃ (compose))
;;("d/" (set L1 ?ᅌ) (set T ?ᇰ) ?ㆁ (compose))
;;("vq" (set L1 ?ᅖ) (set T ?ᇳ) ?ᅖ (compose))
;;("vd" (set L1 ?ᅗ) (set T ?ᇴ) ?ㆄ (compose))
;;("g/" (set L1 ?ᅙ) (set T ?ᇹ) ?ㆆ (compose))
)
(L
;; Set L to CHOSEONG.
("rr"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;;("dq" (set L ?ᅄ) ?ᅄ)
;;("D" (set L ?ᅇ) ?ㆀ)
;;("dw" (set L ?ᅈ) ?ᅈ)
;;("dc" (set L ?ᅉ) ?ᅉ)
;;("dx" (set L ?ᅊ) ?ᅊ)
;;("dv" (set L ?ᅋ) ?ᅋ)
;;("wd" (set L ?ᅍ) ?ᅍ)
;;("ww" (set L ?ᅎ) ?ᅎ)
;;("WW" (set L ?ᅏ) ?ᅏ)
;;("ww/" (set L ?ᅐ) ?ᅐ)
;;("WW/" (set L ?ᅑ) ?ᅑ)
;;("cz" (set L ?ᅒ) ?ᅒ)
;;("cg" (set L ?ᅓ) ?ᅓ)
;;("cc" (set L ?ᅔ) ?ᅔ)
;;("cc/" (set L ?ᅕ) ?ᅕ)
;;("G" (set L ?ᅘ) ?ㆅ)
;;("C" (set L ?ᅟ) ?ᅟ)
)
(V-head
("y") ("u") ("i") ("o") ("p") ("O") ("P")
("h") ("j") ("k") ("K") ("l")
("b") ("n") ("m"))
(V
;; Set V to JUNGSEONG.
("k" (set V ?ᅡ) ?ㅏ (compose))
("o" (set V ?ᅢ) ?ㅐ (compose))
("i" (set V ?ᅣ) ?ㅑ (compose))
("O" (set V ?ᅤ) ?ㅒ (compose))
("j" (set V ?ᅥ) ?ㅓ (compose))
("p" (set V ?ᅦ) ?ㅔ (compose))
("u" (set V ?ᅧ) ?ㅕ (compose))
("P" (set V ?ᅨ) ?ㅖ (compose))
("h" (set V ?ᅩ) ?ㅗ (compose))
("hk" (set V ?ᅪ) ?ㅘ (compose))
("ho" (set V ?ᅫ) ?ㅙ (compose))
("hl" (set V ?ᅬ) ?ㅚ (compose))
("y" (set V ?ᅭ) ?ㅛ (compose))
("n" (set V ?ᅮ) ?ㅜ (compose))
("nj" (set V ?ᅯ) ?ㅝ (compose))
("np" (set V ?ᅰ) ?ㅞ (compose))
("nl" (set V ?ᅱ) ?ㅟ (compose))
("b" (set V ?ᅲ) ?ㅠ (compose))
("m" (set V ?ᅳ) ?ㅡ (compose))
("ml" (set V ?ᅴ) ?ㅢ (compose))
("l" (set V ?ᅵ) ?ㅣ (compose))
;;("kh" (set V ?ᅶ) ?ᅶ (compose))
;;("kn" (set V ?ᅷ) ?ᅷ (compose))
;;("ih" (set V ?ᅸ) ?ᅸ (compose))
;;("iy" (set V ?ᅹ) ?ᅹ (compose))
;;("jh" (set V ?ᅺ) ?ᅺ (compose))
;;("jn" (set V ?ᅻ) ?ᅻ (compose))
;;("jm" (set V ?ᅼ) ?ᅼ (compose))
;;("uh" (set V ?ᅽ) ?ᅽ (compose))
;;("un" (set V ?ᅾ) ?ᅾ (compose))
;;("hj" (set V ?ᅿ) ?ᅿ (compose))
;;("hp" (set V ?ᆀ) ?ᆀ (compose))
;;("hP" (set V ?ᆁ) ?ᆁ (compose))
;;("hh" (set V ?ᆂ) ?ᆂ (compose))
;;("hn" (set V ?ᆃ) ?ᆃ (compose))
;;("yi" (set V ?ᆄ) ?ㆇ (compose))
;;("yO" (set V ?ᆅ) ?ㆈ (compose))
;;("yu" (set V ?ᆆ) ?ᆆ (compose))
;;("yh" (set V ?ᆇ) ?ᆇ (compose))
;;("yl" (set V ?ᆈ) ?ㆉ (compose))
;;("nk" (set V ?ᆉ) ?ᆉ (compose))
;;("no" (set V ?ᆊ) ?ᆊ (compose))
;;("njm" (set V ?ᆋ) ?ᆋ (compose))
;;("nu" (set V ?ᆌ) ?ᆌ (compose))
;;("nn" (set V ?ᆍ) ?ᆍ (compose))
;;("bk" (set V ?ᆎ) ?ᆎ (compose))
;;("bj" (set V ?ᆏ) ?ᆏ (compose))
;;("bp" (set V ?ᆐ) ?ᆐ (compose))
;;("bu" (set V ?ᆑ) ?ㆊ (compose))
;;("bP" (set V ?ᆒ) ?ㆋ (compose))
;;("bn" (set V ?ᆓ) ?ᆓ (compose))
;;("bl" (set V ?ᆔ) ?ㆌ (compose))
;;("mn" (set V ?ᆕ) ?ᆕ (compose))
;;("mm" (set V ?ᆖ) ?ᆖ (compose))
;;("mln" (set V ?ᆗ) ?ᆗ (compose))
;;("lk" (set V ?ᆘ) ?ᆘ (compose))
;;("li" (set V ?ᆙ) ?ᆙ (compose))
;;("lh" (set V ?ᆚ) ?ᆚ (compose))
;;("ln" (set V ?ᆛ) ?ᆛ (compose))
;;("lm" (set V ?ᆜ) ?ᆜ (compose))
;;("lK" (set V ?ᆝ) ?ᆝ (compose))
;;("K" (set V ?ᆞ) ?ᆞ (compose))
;;("Kj" (set V ?ᆟ) ?ᆟ (compose))
;;("Kn" (set V ?ᆠ) ?ᆠ (compose))
;;("Kl" (set V ?ᆡ) ?ᆡ (compose))
;;("KK" (set V ?ᆢ) ?ᆢ (compose))
)
(T-or-TL
;; Set T to JONGSEONG, T1 to the alternate JONGSEONG.
("rr" (set T ?ᆩ) (set T1 ?ᆨ) ?ㄲ (compose))
("rt" (set T ?ᆪ) (set T1 ?ᆨ) ?ㄳ (compose))
("sw" (set T ?ᆬ) (set T1 ?ᆫ) ?ㄵ (compose))
("sg" (set T ?ᆭ) (set T1 ?ᆫ) ?ㄶ (compose))
("fr" (set T ?ᆰ) (set T1 ?ᆯ) ?ㄺ (compose))
("fa" (set T ?ᆱ) (set T1 ?ᆯ) ?ㄻ (compose))
("fq" (set T ?ᆲ) (set T1 ?ᆯ) ?ㄼ (compose))
("ft" (set T ?ᆳ) (set T1 ?ᆯ) ?ㄽ (compose))
("fx" (set T ?ᆴ) (set T1 ?ᆯ) ?ㄾ (compose))
("fv" (set T ?ᆵ) (set T1 ?ᆯ) ?ㄿ (compose))
("fg" (set T ?ᆶ) (set T1 ?ᆯ) ?ㅀ (compose))
("qt" (set T ?ᆹ) (set T1 ?ᆸ) ?ㅄ (compose))
("tt" (set T ?ᆻ) (set T1 ?ᆺ) ?ㅄ (compose))
;;("rf" (set T ?ᇃ) ?ᇃ (compose))
;;("rtr" (set T ?ᇄ) ?ᇄ (compose))
;;("st" (set T ?ᇇ) ?ㅧ (compose))
;;("st/" (set T ?ᇈ) ?ㅨ (compose))
;;("sx" (set T ?ᇉ) ?ᇉ (compose))
;;("ef" (set T ?ᇋ) ?ᇋ (compose))
;;("frt" (set T ?ᇌ) ?ᇌ (compose))
;;("fe" (set T ?ᇎ) ?ㅪ (compose))
;;("feg" (set T ?ᇏ) ?ᇏ (compose))
;;("far" (set T ?ᇑ) ?ᇑ (compose))
;;("fat" (set T ?ᇒ) ?ᇒ (compose))
;;("fqt" (set T ?ᇓ) ?ㅫ (compose))
;;("fqg" (set T ?ᇔ) ?ᇔ (compose))
;;("fqd" (set T ?ᇕ) ?ᇕ (compose))
;;("ftt" (set T ?ᇖ) ?ᇖ (compose))
;;("ft/" (set T ?ᇗ) ?ㅬ (compose))
;;("fz" (set T ?ᇘ) ?ᇘ (compose))
;;("fMd" (set T ?ᇙ) ?ㅭ (compose))
;;("ar" (set T ?ᇚ) ?ᇚ (compose))
;;("af" (set T ?ᇛ) ?ᇛ (compose))
;;("at" (set T ?ᇝ) ?ㅯ (compose))
;;("aT" (set T ?ᇞ) ?ᇞ (compose))
;;("at/" (set T ?ᇟ) ?ㅰ (compose))
;;("ac" (set T ?ᇠ) ?ᇠ (compose))
;;("ag" (set T ?ᇡ) ?ᇡ (compose))
;;("qf" (set T ?ᇣ) ?ᇣ (compose))
;;("qg" (set T ?ᇥ) ?ᇥ (compose))
;;("dR" (set T ?ᇭ) ?ᇭ (compose))
;;("dt/" (set T ?ᇮ) ?ㆃ (compose))
;;("dz" (set T ?ᇯ) ?ᇯ (compose))
;;("gs" (set T ?ᇵ) ?ᇵ (compose))
;;("gf" (set T ?ᇶ) ?ᇶ (compose))
;;("ga" (set T ?ᇷ) ?ᇷ (compose))
;;("gq" (set T ?ᇸ) ?ᇸ (compose))
)
(special
("J" (set V ?ᅠ) ?ᅠ (compose)))
(backspace
((BackSpace) (cond ((> @@ 1) (undo)) (1 (unhandle))))))
(state
(init
;; This is to suppress compose action.
(t (set L 0))
(L-or-T (set L L1) (set T 0x11A7) (shift state-L))
(L (set T 0x11A7) (shift state-L))
(V)
(special)
(backspace))
(state-L
(V (shift state-LV))
(backspace))
(state-LV
(L-or-T (shift state-LVL-or-LVT))
(T-or-TL (shift state-LVT-or-LVTL))
(backspace))
(state-LVL-or-LVT
(L-or-T-head (delete @<) (pushback 0) (set L 0) (shift state-fix-LVT))
(V-head (delete @<) (pushback 0) (set L 0) (shift state-fix-LV))
(backspace))
(state-fix-LVT
(L-or-T (set L L1) (set T 0x11A7) (shift state-fix-LVT-2))
(L (set T 0x11A7) (shift state-fix-LVT-2)))
(state-fix-LVT-2
(V (shift state-fix-LVT-3)))
(state-fix-LVT-3
(L-or-T (shift init)))
(state-fix-LV
(L-or-T (set L L1) (set T 0x11A7) (shift state-fix-LV-2))
(L (set T 0x11A7) (shift state-fix-LV-2)))
(state-fix-LV-2
(V (shift init)))
;; e.g. "rkrt"
(state-LVT-or-LVTL
(L-or-T-head ;; e.g. "rkrtr"; make the last "r" start a new composing.
(pushback 1) (shift init))
(V-head ;; e.g. "rkrth"; make the last "th" start a new composing.
(delete @<) (set T T1) (compose) (pushback 2) (shift init))
(backspace)))
;; Local Variables:
;; coding: utf-8
;; mode: lisp
;; End:
|