Uim scm file for Hangul sebeol final and English Colemak keyboard layout

Four to five years ago I learned about Seboel keyboard layout for Hangul (Modern Korean alphabet invented by the Great King Sejong five hundred years ago.) To carry on enthusiasm about Hangul, I abandoned Duboel keyboard layout and switched to Seboel final.

The transition to Seboel keyboard gave me little over confidence so that I would replace Qwerty with Colemak later on. What was I thinking back then?

And the decision has brought big challenges whenever I do upgrade main applications, i.e. web browser, word processor, or operation system exclusively Debian.

I’ve ran Debian Lenny, Squeez, Wheezy, and Jessie. Recent systemd fiasco made me switching to other Linux distributions that do not use systemd.

Ubuntu or other Debian forks aren’t my taste because their upgrade cycle is too often, heavy on graphic user interface which makes the system slow and difficult to troubleshoot at system level.

I will finish this post later.

Devuan 1.0 is in alpha stage.
OS: Devuan 1.0 (Debian without systemd)

Installation

$ sudo apt-get install uim uim-byeoru

It would install uim related packages.
$ dpkg -l | grep uim
ii libuim-custom2:amd64 1:1.8.6-11 amd64 Universal Input Method - uim-custom API library
ii libuim-data 1:1.8.6-11 amd64 Universal Input Method - data files
ii libuim-scm0:amd64 1:1.8.6-11 amd64 Universal Input Method - uim-scm API library
ii libuim8:amd64 1:1.8.6-11 amd64 Universal Input Method - uim library
ii uim 1:1.8.6-11 all Universal Input Method - metapackage
ii uim-byeoru 1:1.8.6-11 all Universal Input Method - byeoru hangul input support
ii uim-common 1:1.8.6-11 all Universal Input Method - common files
ii uim-fep 1:1.8.6-11 amd64 Universal Input Method - front end processor
ii uim-gtk2.0 1:1.8.6-11 amd64 Universal Input Method - GTK+2.x front end
ii uim-gtk3 1:1.8.6-11 amd64 Universal Input Method - GTK+3.x front end
ii uim-qt 1:1.8.6-11 amd64 Universal Input Method - Qt 4.x front end
ii uim-utils 1:1.8.6-11 amd64 Universal Input Method - utilities
ii uim-xim 1:1.8.6-11 amd64 Universal Input Method - XIM compatibility interface

Run uim-pref-gtk to set up Byeoru (Hangul input method).

I experinced incomplete word compostion errors on Hangul 3-beol final strict. Press shift and space keys switch between Colemak and 3-beol final keyboard layout.

[Global setting]
Default input method: Byeoru
Enabled input method: “Byeoru”

[Byeoru]
Hangul keyboard layout: Hangul 3-beol final generous
Jamo input is: orderless
ESC turns off Hangul mode (for vi users): on

[Byeoru key bindings 1]
[Byeoru] on: “space”
[Byeoru] off: “space”

Environment variables and commands for uim and Colemak keyboard layout. I put them in .xinitrc file.

# uim
export GTK_IM_MODULE='uim'
export QT_IM_MODULE='uim'
export XMODIFIERS='@im=uim'

uim-xim --engine=byeoru &

# load custom key maps
usermodmap=$HOME/.colemak_3keys.xmap
if [ -f $usermodmap ]; then
/usr/bin/xmodmap $usermodmap
fi

Default Colemak keyboard layout has two Backspace key. CapsLock key works as Backspace but occasionally when writing all capital letters occurs, it’s inconvient. I made a simple xmodmap file to do it. It swaps CapsLock and Backspace keys for Colemak.

clear Lock
keycode 66 = BackSpace NoSymbol BackSpace
add Lock = Caps_Lock
keycode 22 = Caps_Lock NoSymbol Caps_Lock
keycode 108 = Hangul NoSymbol Hangul

Here is crucial part of the installation.

Byeoru maps all Hangul alphabets to English keys on Qwerty keyboard layout. I followed the customization procedure of custom keyboard layout for Hangul.(http://nemonein.egloos.com/5269527)

I created a key map file that matches Hangul alphabets to English keys on Colemak, named it ~/.uim.


;;; byeoru.scm: a Hangul input module for uim.
;;;
;;; Copyright (c) 2003-2013 uim Project http://code.google.com/p/uim/
;;;
;;; All rights reserved.
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;; 1. Redistributions of source code must retain the above copyright
;;; notice, this list of conditions and the following disclaimer.
;;; 2. Redistributions in binary form must reproduce the above copyright
;;; notice, this list of conditions and the following disclaimer in the
;;; documentation and/or other materials provided with the distribution.
;;; 3. Neither the name of authors nor the names of its contributors
;;; may be used to endorse or promote products derived from this software
;;; without specific prior written permission.
;;;
;;; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND
;;; ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
;;; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
;;; ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE
;;; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
;;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
;;; OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
;;; HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
;;; LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
;;; OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
;;; SUCH DAMAGE.
;;;;

;; Hughe
;; 2015/11/09
;; 3-beol final on Colemak keyboard layout.
;; Save it to ~/.uim and restart uim.

(require-module "byeoru")

(byeoru-define-layout byeoru-layout-strict3final
;; Unshifted keys
("`" . "*")
("1" (jongseong-hieuh . 1))
("2" (jongseong-ssangsios . 5))
("3" (jongseong-bieub . 1))
("4" (jungseong-yo . 1))
("5" (jungseong-yu . 1))
("6" (jungseong-ya . 1))
("7" (jungseong-ye . 1))
("8" (jungseong-ui . 4))
("9" (jungseong-u . 2))
("0" (choseong-kieuk . 1))
("-" . ")")
("=" . ">")
("q" (jongseong-sios . 1))
("w" (jongseong-rieul . 1))
("f" (jungseong-yeo . 1))
("p" (jungseong-ae . (1 4)))
("g" (jungseong-eo . (1 4)))
("j" (choseong-rieul . 1))
("l" (choseong-digeud . (3 5)))
("u" (choseong-mieum . 1))
("y" (choseong-chieuch . 1))
(";" (choseong-pieup . 1))
("[" . "(")
("]" . "<")
("\\" . ":")
("a" (jongseong-ieung . 1))
("r" (jongseong-nieun . 1))
("s" (jungseong-i . (1 4)))
("t" (jungseong-a . (1 4)))
("d" (jungseong-eu . 1))
("h" (choseong-nieun . 1))
("n" (choseong-ieung . 1))
("e" (choseong-giyeog . (3 5)))
("i" (choseong-jieuj . (3 5)))
("o" (choseong-bieub . (3 5)))
("'" (choseong-tieut . 1))
("z" (jongseong-mieum . 1))
("x" (jongseong-giyeog . 1))
("c" (jungseong-e . (1 4)))
("v" (jungseong-o . 1))
("b" (jungseong-u . 1))
("k" (choseong-sios . (3 5)))
("m" (choseong-hieuh . 1))
("/" (jungseong-o . 2))
;; Shifted keys
("~" . #x203b) ; U+203B, REFERENCE MARK
("!" (jongseong-ssanggiyeog . 5))
("@" (jongseong-rieulgiyeog . 4))
("#" (jongseong-jieuj . 1))
("$" (jongseong-rieulpieup . 4))
("%" (jongseong-rieultieut . 4))
("^" . "=")
("&" . #x201c) ; U+201C, LEFT DOUBLE QUOTATION MARK
("*" . #x201d) ; U+201D, RIGHT DOUBLE QUOTATION MARK
("(" . "'")
(")" . "~")
("_" . ";")
("Q" (jongseong-pieup . 1))
("W" (jongseong-tieut . 1))
("F" (jongseong-nieunjieuj . 4))
("P" (jongseong-rieulhieuh . 4))
("G" (jongseong-rieulsios . 4))
("J" . "5")
("L" . "6")
("U" . "7")
("Y" . "8")
(":" . "9")
("{" . "%")
("}" . "/")
("|" . "\\")
;; ("|" . #x20a9) ; U+20A9, WON SIGN
("A" (jongseong-digeud . 1))
("R" (jongseong-nieunhieuh . 4))
("S" (jongseong-rieulbieub . 4))
("T" (jongseong-rieulmieum . 4))
("D" (jungseong-yae . 1))
("H" . "0")
("N" . "1")
("E" . "2")
("I" . "3")
("O" . "4")
("\"" . #x00b7) ; U+00B7, MIDDLE DOT
("Z" (jongseong-chieuch . 1))
("X" (jongseong-bieubsios . 4))
("C" (jongseong-kieuk . 1))
("V" (jongseong-giyeogsios . 4))
("B" . "?")
("K" . "-")
("M" . "\"")
("" . ".")
("?" . "!"))

(byeoru-define-layout byeoru-layout-generous3final
;; Unshifted keys
("`" . "*")
("1" (jongseong-hieuh . (1 4)))
("2" (jongseong-ssangsios . 5))
("3" (jongseong-bieub . (3 4)))
("4" (jungseong-yo . 1))
("5" (jungseong-yu . 1))
("6" (jungseong-ya . 1))
("7" (jungseong-ye . 1))
("8" (jungseong-ui . 4))
("9" (jungseong-u . 3))
("0" (choseong-kieuk . 1))
("-" . ")")
("=" . ">")
("q" (jongseong-sios . (3 4 5)))
("w" (jongseong-rieul . 3))
("f" (jungseong-yeo . 1))
("p" (jungseong-ae . (1 4)))
("g" (jungseong-eo . (1 4)))
("j" (choseong-rieul . 1))
("l" (choseong-digeud . (3 5)))
("u" (choseong-mieum . 1))
("y" (choseong-chieuch . 1))
(";" (choseong-pieup . 1))
("[" . "(")
("]" . "<")
("\\" . ":")
("a" (jongseong-ieung . 1))
("r" (jongseong-nieun . 3))
("s" (jungseong-i . (1 4)))
("t" (jungseong-a . (1 4)))
("d" (jungseong-eu . 3))
("h" (choseong-nieun . 1))
("n" (choseong-ieung . 1))
("e" (choseong-giyeog . (3 5)))
("i" (choseong-jieuj . (3 5)))
("o" (choseong-bieub . (3 5)))
("'" (choseong-tieut . 1))
("z" (jongseong-mieum . (1 4)))
("x" (jongseong-giyeog . (3 4 5)))
("c" (jungseong-e . (1 4)))
("v" (jungseong-o . 3))
("b" (jungseong-u . 3))
("k" (choseong-sios . (3 5)))
("m" (choseong-hieuh . 1))
("/" (jungseong-o . 3))
;; Shifted keys
("~" . #x203b) ; U+203B, REFERENCE MARK
("!" (jongseong-ssanggiyeog . 5))
("@" (jongseong-rieulgiyeog . 4))
("#" (jongseong-jieuj . (1 4)))
("$" (jongseong-rieulpieup . 4))
("%" (jongseong-rieultieut . 4))
("^" . "=")
("&" . #x201c) ; U+201C, LEFT DOUBLE QUOTATION MARK
("*" . #x201d) ; U+201D, RIGHT DOUBLE QUOTATION MARK
("(" . "'")
(")" . "~")
("_" . ";")
("Q" (jongseong-pieup . (1 4)))
("W" (jongseong-tieut . (1 4)))
("F" (jongseong-nieunjieuj . 4))
("P" (jongseong-rieulhieuh . 4))
("G" (jongseong-rieulsios . 4))
("J" . "5")
("L" . "6")
("U" . "7")
("Y" . "8")
(":" . "9")
("{" . "%")
("}" . "/")
("|" . "\\")
;; ("|" . #x20a9) ; U+20A9, WON SIGN
("A" (jongseong-digeud . 1))
("R" (jongseong-nieunhieuh . 4))
("S" (jongseong-rieulbieub . 4))
("T" (jongseong-rieulmieum . 4))
("D" (jungseong-yae . 1))
("H" . "0")
("N" . "1")
("E" . "2")
("I" . "3")
("O" . "4")
("\"". #x00b7) ; U+00B7, MIDDLE DOT
("Z" (jongseong-chieuch . 1))
("X" (jongseong-bieubsios . 4))
("C" (jongseong-kieuk . 1))
("V" (jongseong-giyeogsios . 4))
("B" . "?")
("K" . "-")
("M" . "\"")
("" . ".")
("?" . "!"))

3-beol final (generous) keys

※ ㄲ ㄺ ㅈ ㄿ ㄾ = “ ” ‘ ~ ; + \
* ㅎ ㅆ ㅂ ㅛ ㅠ ㅑ ㅖ ㅢ ㅜ ㅋ ) > :

ㅍ ㅌ ㄵ ㅀ ㄽ 5 6 7 8 9 % /
ㅅ ㄹ ㅕ ㅐ ㅓ ㄹ ㄷ ㅁ ㅊ ㅍ % <

ㄷ ㄶ ㄼ ㄻ ㅒ 0 1 2 3 4 ·
ㅇ ㄴ ㅣ ㅏ ㅡ ㄴ ㄱ ㅈ ㅂ ㅌ

ㅊ ㅄ ㅋ ㄳ ? – ” , . !
ㅁ ㄱ ㅔ ㅗ ㅜ ㅅ ㅎ , . ㅗ

An article about Hangul I typed to test Byeoru.

퍼온곳: http://www.hangul.or.kr/html/KoreaandChinese.asp?cnum=35

훈민정음 해례본의 제자해를 보면 훈민정음을 창제한 원리에 대한 설명이 있다
.

“천지의 이치는 오직 음양과 오행뿐이다. 곤괘와 복괘의 사이에서 태극이 생겨나서 움직이고 멎고 한 후에 음과 양이 생겨났던 것이다. 무릇 어떤 생물이든 하늘과 땅 사이에 있는 것은 음과 양을 버리고 어디로 가겠는가. 그러니 사람의 말소리에도 모두 음과 양의 이치가 있는 것인데 다만 사람들이 살피지 못했을 뿐이다. 이제 정음의 만듬도 처음부터 지혜와 힘으로써 경영하고 찾아낸 것이 아니고 다만 그 소리에 따라서 그 이치를 규명했을 뿐이다. 이치란 원래 둘이 아니니 어찌 얻으면 하늘과 땅, 귀신과 더불어 그 씀을 함께하지 않겠는가.

훈민정음은 음양오행의 동양 사상에 따라서 말소리의 이치를 밝혀낸 소리글

훈민정음이 음양오행의 동양 사상에 따라서 말소리의 이치를 밝혀낸 소리글임을 밝히고 있다. 세종 대왕은 이와 같은 기본 원리를 바탕으로, 글자 모양을 소리내는 기관의 모양이나 발음 기관의 운동 모양을 본떠서, 문자 사상 유래가 없는 독창적이고 과학적인 방법으로 훈민정음을 만들었다.

훈민정음은 말소리를 초성과 중성, 그리고 종성, 셋으로 나누고 초성의 글씨는 소리를 내는 발음 기관의 모양이나 말소리를 낼 때 발음기관의 운동 모양을 본떠서 만들었고, 중성은 동양 철학의 음양설에 따라서 삼재인 하늘과 땅, 사람의 모양을 본떠서 만들고, 종성은 초성의 글자를 그대로 쓰게 했다.

자음의 기본 글자는 소리를 내는 발음 기관의 모양을 본떠서 만들었다. 초성인 자음의 기본 글자는 ㄱ, ㄴ, ㅁ, ㅅ, ㅇ 다섯 가지다.

About janpenguin

Email: janpenguin [at] riseup [dot] net Every content on the blog is made by Free and Open Source Software in GNU/Linux.
This entry was posted in GNU/Linux and tagged , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s