[uim-commit] r2425 - trunk/scm
ekato at freedesktop.org
ekato at freedesktop.org
Wed Dec 7 23:14:57 PST 2005
Author: ekato
Date: 2005-12-07 23:14:39 -0800 (Wed, 07 Dec 2005)
New Revision: 2425
Modified:
trunk/scm/byeoru-custom.scm
trunk/scm/byeoru.scm
Log:
2005-12-08 Jae-hyeon Park
* scm/byeoru.scm : Now checks shift key bit in key-state only when
an latin alphabet key is pressed since uim.el does not provide
shift key information if "!" key is pressed for example. Uses
ucs-to-utf8-string in util.scm instead of
byeoru-ucs-to-utf-8-string. Underlines a word being converted.
Input mode label changed.
* scm/byeoru-custom.scm (byeoru-im-long-desc) : Update.
Modified: trunk/scm/byeoru-custom.scm
===================================================================
--- trunk/scm/byeoru-custom.scm 2005-12-08 05:37:31 UTC (rev 2424)
+++ trunk/scm/byeoru-custom.scm 2005-12-08 07:14:39 UTC (rev 2425)
@@ -37,7 +37,7 @@
(define byeoru-im-name-label (N_ "Byeoru"))
(define byeoru-im-short-desc (N_ "The Byeoru Hangul input suite"))
;; for future use
-(define byeoru-im-long-desc (N_ "A comprehensive input method suite for Hangul. This covers almost major input methods such as 2-beol and 3-beol variants, and provides some advanced features such as Hangul-Chinese conversion. The name 'byeoru' is Korean for inkstone."))
+(define byeoru-im-long-desc (N_ "A comprehensive input method suite for Hangul. This covers most of the major input methods such as 2-beol and 3-beol variants, and provides features such as Hangul-Chinese conversion. The name 'byeoru' means inkstone in Korean."))
(define byeoru-layout-alist
(list
Modified: trunk/scm/byeoru.scm
===================================================================
--- trunk/scm/byeoru.scm 2005-12-08 05:37:31 UTC (rev 2424)
+++ trunk/scm/byeoru.scm 2005-12-08 07:14:39 UTC (rev 2425)
@@ -36,13 +36,6 @@
(require-custom "generic-key-custom.scm")
(require "rk.scm")
-;; (define (byeoru-require file)
-;; (let ((path (string-append (getenv "HOME") "/pro/uim/" file)))
-;; (require path)))
-;; (define (byeoru-require-custom file)
-;; (let ((path (string-append (getenv "HOME") "/pro/uim/" file)))
-;; (require-custom path)))
-
(require-custom "byeoru-custom.scm")
(require-custom "byeoru-key-custom.scm")
(require "byeoru-symbols.scm")
@@ -214,40 +207,40 @@
(define byeoru-layout-hangul2
(byeoru-expand-layout
;; Unshifted keys
- '((("q" . #f) . ((choseong-bieub . 1) (jongseong-bieub . (3 4))))
- (("w" . #f) . ((choseong-jieuj . 1) (jongseong-jieuj . (1 4))))
- (("e" . #f) . ((choseong-digeud . 1) (jongseong-digeud . 1)))
- (("r" . #f) . ((choseong-giyeog . 1) (jongseong-giyeog . (3 4))))
- (("t" . #f) . ((choseong-sios . 1) (jongseong-sios . (1 4))))
- (("y" . #f) . ((jungseong-yo . 1)))
- (("u" . #f) . ((jungseong-yeo . 1)))
- (("i" . #f) . ((jungseong-ya . 1)))
- (("o" . #f) . ((jungseong-ae . (1 4))))
- (("p" . #f) . ((jungseong-e . (1 4))))
- (("a" . #f) . ((choseong-mieum . 1) (jongseong-mieum . (1 4))))
- (("s" . #f) . ((choseong-nieun . 1) (jongseong-nieun . 3)))
- (("d" . #f) . ((choseong-ieung . 1) (jongseong-ieung . 1)))
- (("f" . #f) . ((choseong-rieul . 1) (jongseong-rieul . 3)))
- (("g" . #f) . ((choseong-hieuh . 1) (jongseong-hieuh . (1 4))))
- (("h" . #f) . ((jungseong-o . 3)))
- (("j" . #f) . ((jungseong-eo . (1 4))))
- (("k" . #f) . ((jungseong-a . (1 4))))
- (("l" . #f) . ((jungseong-i . (1 4))))
- (("z" . #f) . ((choseong-kieuk . 1) (jongseong-kieuk . 1)))
- (("x" . #f) . ((choseong-tieut . 1) (jongseong-tieut . (1 4))))
- (("c" . #f) . ((choseong-chieuch . 1) (jongseong-chieuch . 1)))
- (("v" . #f) . ((choseong-pieup . 1) (jongseong-pieup . (1 4))))
- (("b" . #f) . ((jungseong-yu . 1)))
- (("n" . #f) . ((jungseong-u . 3)))
- (("m" . #f) . ((jungseong-eu . 3)))
+ '(("q" (choseong-bieub . 1) (jongseong-bieub . (3 4)))
+ ("w" (choseong-jieuj . 1) (jongseong-jieuj . (1 4)))
+ ("e" (choseong-digeud . 1) (jongseong-digeud . 1))
+ ("r" (choseong-giyeog . 1) (jongseong-giyeog . (3 4)))
+ ("t" (choseong-sios . 1) (jongseong-sios . (1 4)))
+ ("y" (jungseong-yo . 1))
+ ("u" (jungseong-yeo . 1))
+ ("i" (jungseong-ya . 1))
+ ("o" (jungseong-ae . (1 4)))
+ ("p" (jungseong-e . (1 4)))
+ ("a" (choseong-mieum . 1) (jongseong-mieum . (1 4)))
+ ("s" (choseong-nieun . 1) (jongseong-nieun . 3))
+ ("d" (choseong-ieung . 1) (jongseong-ieung . 1))
+ ("f" (choseong-rieul . 1) (jongseong-rieul . 3))
+ ("g" (choseong-hieuh . 1) (jongseong-hieuh . (1 4)))
+ ("h" (jungseong-o . 3))
+ ("j" (jungseong-eo . (1 4)))
+ ("k" (jungseong-a . (1 4)))
+ ("l" (jungseong-i . (1 4)))
+ ("z" (choseong-kieuk . 1) (jongseong-kieuk . 1))
+ ("x" (choseong-tieut . 1) (jongseong-tieut . (1 4)))
+ ("c" (choseong-chieuch . 1) (jongseong-chieuch . 1))
+ ("v" (choseong-pieup . 1) (jongseong-pieup . (1 4)))
+ ("b" (jungseong-yu . 1))
+ ("n" (jungseong-u . 3))
+ ("m" (jungseong-eu . 3))
;; Shifted keys
- (("q" . #t) . ((choseong-ssangbieub . 1)))
- (("w" . #t) . ((choseong-ssangjieuj . 1)))
- (("e" . #t) . ((choseong-ssangdigeud . 1)))
- (("r" . #t) . ((choseong-ssanggiyeog . 1) (jongseong-ssanggiyeog . 5)))
- (("t" . #t) . ((choseong-ssangsios . 1) (jongseong-ssangsios . 5)))
- (("o" . #t) . ((jungseong-yae . 1)))
- (("p" . #t) . ((jungseong-ye . 1))))))
+ ("Q" (choseong-ssangbieub . 1))
+ ("W" (choseong-ssangjieuj . 1))
+ ("E" (choseong-ssangdigeud . 1))
+ ("R" (choseong-ssanggiyeog . 1) (jongseong-ssanggiyeog . 5))
+ ("T" (choseong-ssangsios . 1) (jongseong-ssangsios . 5))
+ ("O" (jungseong-yae . 1))
+ ("P" (jungseong-ye . 1)))))
;; The following definitions of 3-beol variants [final, 390, no-shift]
;; are based on the US keyboard layout. A user of a different layout
@@ -256,420 +249,420 @@
(define byeoru-layout-strict3final
(byeoru-expand-layout
;; Unshifted keys
- '((("`" . #f) . "*")
- (("1" . #f) . ((jongseong-hieuh . 1)))
- (("2" . #f) . ((jongseong-ssangsios . 5)))
- (("3" . #f) . ((jongseong-bieub . 1)))
- (("4" . #f) . ((jungseong-yo . 1)))
- (("5" . #f) . ((jungseong-yu . 1)))
- (("6" . #f) . ((jungseong-ya . 1)))
- (("7" . #f) . ((jungseong-ye . 1)))
- (("8" . #f) . ((jungseong-ui . 4)))
- (("9" . #f) . ((jungseong-u . 2)))
- (("0" . #f) . ((choseong-kieuk . 1)))
- (("-" . #f) . ")")
- (("=" . #f) . ">")
- (("q" . #f) . ((jongseong-sios . 1)))
- (("w" . #f) . ((jongseong-rieul . 1)))
- (("e" . #f) . ((jungseong-yeo . 1)))
- (("r" . #f) . ((jungseong-ae . (1 4))))
- (("t" . #f) . ((jungseong-eo . (1 4))))
- (("y" . #f) . ((choseong-rieul . 1)))
- (("u" . #f) . ((choseong-digeud . (3 5))))
- (("i" . #f) . ((choseong-mieum . 1)))
- (("o" . #f) . ((choseong-chieuch . 1)))
- (("p" . #f) . ((choseong-pieup . 1)))
- (("[" . #f) . "(")
- (("]" . #f) . "<")
- (("\\" . #f) . ":")
- (("a" . #f) . ((jongseong-ieung . 1)))
- (("s" . #f) . ((jongseong-nieun . 1)))
- (("d" . #f) . ((jungseong-i . (1 4))))
- (("f" . #f) . ((jungseong-a . (1 4))))
- (("g" . #f) . ((jungseong-eu . 1)))
- (("h" . #f) . ((choseong-nieun . 1)))
- (("j" . #f) . ((choseong-ieung . 1)))
- (("k" . #f) . ((choseong-giyeog . (3 5))))
- (("l" . #f) . ((choseong-jieuj . (3 5))))
- ((";" . #f) . ((choseong-bieub . (3 5))))
- (("'" . #f) . ((choseong-tieut . 1)))
- (("z" . #f) . ((jongseong-mieum . 1)))
- (("x" . #f) . ((jongseong-giyeog . 1)))
- (("c" . #f) . ((jungseong-e . (1 4))))
- (("v" . #f) . ((jungseong-o . 1)))
- (("b" . #f) . ((jungseong-u . 1)))
- (("n" . #f) . ((choseong-sios . (3 5))))
- (("m" . #f) . ((choseong-hieuh . 1)))
- (("/" . #f) . ((jungseong-o . 2)))
+ '(("`" . "*")
+ ("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))
+ ("e" (jungseong-yeo . 1))
+ ("r" (jungseong-ae . (1 4)))
+ ("t" (jungseong-eo . (1 4)))
+ ("y" (choseong-rieul . 1))
+ ("u" (choseong-digeud . (3 5)))
+ ("i" (choseong-mieum . 1))
+ ("o" (choseong-chieuch . 1))
+ ("p" (choseong-pieup . 1))
+ ("[" . "(")
+ ("]" . "<")
+ ("\\" . ":")
+ ("a" (jongseong-ieung . 1))
+ ("s" (jongseong-nieun . 1))
+ ("d" (jungseong-i . (1 4)))
+ ("f" (jungseong-a . (1 4)))
+ ("g" (jungseong-eu . 1))
+ ("h" (choseong-nieun . 1))
+ ("j" (choseong-ieung . 1))
+ ("k" (choseong-giyeog . (3 5)))
+ ("l" (choseong-jieuj . (3 5)))
+ (";" (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))
+ ("n" (choseong-sios . (3 5)))
+ ("m" (choseong-hieuh . 1))
+ ("/" (jungseong-o . 2))
;; Shifted keys
- (("~" . #t) . 8251) ; U+203B, REFERENCE MARK
- (("!" . #t) . ((jongseong-ssanggiyeog . 5)))
- (("@" . #t) . ((jongseong-rieulgiyeog . 4)))
- (("#" . #t) . ((jongseong-jieuj . 1)))
- (("$" . #t) . ((jongseong-rieulpieup . 4)))
- (("%" . #t) . ((jongseong-rieultieut . 4)))
- (("^" . #t) . "=")
- (("&" . #t) . 8220) ; U+201C, LEFT DOUBLE QUOTATION MARK
- (("*" . #t) . 8221) ; U+201D, RIGHT DOUBLE QUOTATION MARK
- (("(" . #t) . "'")
- ((")" . #t) . "~")
- (("_" . #t) . ";")
- (("q" . #t) . ((jongseong-pieup . 1)))
- (("w" . #t) . ((jongseong-tieut . 1)))
- (("e" . #t) . ((jongseong-nieunjieuj . 4)))
- (("r" . #t) . ((jongseong-rieulhieuh . 4)))
- (("t" . #t) . ((jongseong-rieulsios . 4)))
- (("y" . #t) . "5")
- (("u" . #t) . "6")
- (("i" . #t) . "7")
- (("o" . #t) . "8")
- (("p" . #t) . "9")
- (("{" . #t) . "%")
- (("}" . #t) . "/")
- (("|" . #t) . "\\")
-;; (("|" . #t) . 8361) ; U+20A9, WON SIGN
- (("a" . #t) . ((jongseong-digeud . 1)))
- (("s" . #t) . ((jongseong-nieunhieuh . 4)))
- (("d" . #t) . ((jongseong-rieulbieub . 4)))
- (("f" . #t) . ((jongseong-rieulmieum . 4)))
- (("g" . #t) . ((jungseong-yae . 1)))
- (("h" . #t) . "0")
- (("j" . #t) . "1")
- (("k" . #t) . "2")
- (("l" . #t) . "3")
- ((":" . #t) . "4")
- (("\"" . #t) . 183) ; U+00B7, MIDDLE DOT
- (("z" . #t) . ((jongseong-chieuch . 1)))
- (("x" . #t) . ((jongseong-bieubsios . 4)))
- (("c" . #t) . ((jongseong-kieuk . 1)))
- (("v" . #t) . ((jongseong-giyeogsios . 4)))
- (("b" . #t) . "?")
- (("n" . #t) . "-")
- (("m" . #t) . "\"")
- (("<" . #t) . ",")
- ((">" . #t) . ".")
- (("?" . #t) . "!"))))
+ ("~" . 8251) ; U+203B, REFERENCE MARK
+ ("!" (jongseong-ssanggiyeog . 5))
+ ("@" (jongseong-rieulgiyeog . 4))
+ ("#" (jongseong-jieuj . 1))
+ ("$" (jongseong-rieulpieup . 4))
+ ("%" (jongseong-rieultieut . 4))
+ ("^" . "=")
+ ("&" . 8220) ; U+201C, LEFT DOUBLE QUOTATION MARK
+ ("*" . 8221) ; U+201D, RIGHT DOUBLE QUOTATION MARK
+ ("(" . "'")
+ (")" . "~")
+ ("_" . ";")
+ ("Q" (jongseong-pieup . 1))
+ ("W" (jongseong-tieut . 1))
+ ("E" (jongseong-nieunjieuj . 4))
+ ("R" (jongseong-rieulhieuh . 4))
+ ("T" (jongseong-rieulsios . 4))
+ ("Y" . "5")
+ ("U" . "6")
+ ("I" . "7")
+ ("O" . "8")
+ ("P" . "9")
+ ("{" . "%")
+ ("}" . "/")
+ ("|" . "\\")
+;; ("|" . 8361) ; U+20A9, WON SIGN
+ ("A" (jongseong-digeud . 1))
+ ("S" (jongseong-nieunhieuh . 4))
+ ("D" (jongseong-rieulbieub . 4))
+ ("F" (jongseong-rieulmieum . 4))
+ ("G" (jungseong-yae . 1))
+ ("H" . "0")
+ ("J" . "1")
+ ("K" . "2")
+ ("L" . "3")
+ (":" . "4")
+ ("\"" . 183) ; U+00B7, MIDDLE DOT
+ ("Z" (jongseong-chieuch . 1))
+ ("X" (jongseong-bieubsios . 4))
+ ("C" (jongseong-kieuk . 1))
+ ("V" (jongseong-giyeogsios . 4))
+ ("B" . "?")
+ ("N" . "-")
+ ("M" . "\"")
+ ("<" . ",")
+ (">" . ".")
+ ("?" . "!"))))
(define byeoru-layout-generous3final
(byeoru-expand-layout
;; Unshifted keys
- '((("`" . #f) . "*")
- (("1" . #f) . ((jongseong-hieuh . (1 4))))
- (("2" . #f) . ((jongseong-ssangsios . 5)))
- (("3" . #f) . ((jongseong-bieub . (3 4))))
- (("4" . #f) . ((jungseong-yo . 1)))
- (("5" . #f) . ((jungseong-yu . 1)))
- (("6" . #f) . ((jungseong-ya . 1)))
- (("7" . #f) . ((jungseong-ye . 1)))
- (("8" . #f) . ((jungseong-ui . 4)))
- (("9" . #f) . ((jungseong-u . 3)))
- (("0" . #f) . ((choseong-kieuk . 1)))
- (("-" . #f) . ")")
- (("=" . #f) . ">")
- (("q" . #f) . ((jongseong-sios . (3 4 5))))
- (("w" . #f) . ((jongseong-rieul . 3)))
- (("e" . #f) . ((jungseong-yeo . 1)))
- (("r" . #f) . ((jungseong-ae . (1 4))))
- (("t" . #f) . ((jungseong-eo . (1 4))))
- (("y" . #f) . ((choseong-rieul . 1)))
- (("u" . #f) . ((choseong-digeud . (3 5))))
- (("i" . #f) . ((choseong-mieum . 1)))
- (("o" . #f) . ((choseong-chieuch . 1)))
- (("p" . #f) . ((choseong-pieup . 1)))
- (("[" . #f) . "(")
- (("]" . #f) . "<")
- (("\\" . #f) . ":")
- (("a" . #f) . ((jongseong-ieung . 1)))
- (("s" . #f) . ((jongseong-nieun . 3)))
- (("d" . #f) . ((jungseong-i . (1 4))))
- (("f" . #f) . ((jungseong-a . (1 4))))
- (("g" . #f) . ((jungseong-eu . 3)))
- (("h" . #f) . ((choseong-nieun . 1)))
- (("j" . #f) . ((choseong-ieung . 1)))
- (("k" . #f) . ((choseong-giyeog . (3 5))))
- (("l" . #f) . ((choseong-jieuj . (3 5))))
- ((";" . #f) . ((choseong-bieub . (3 5))))
- (("'" . #f) . ((choseong-tieut . 1)))
- (("z" . #f) . ((jongseong-mieum . (1 4))))
- (("x" . #f) . ((jongseong-giyeog . (3 4 5))))
- (("c" . #f) . ((jungseong-e . (1 4))))
- (("v" . #f) . ((jungseong-o . 3)))
- (("b" . #f) . ((jungseong-u . 3)))
- (("n" . #f) . ((choseong-sios . (3 5))))
- (("m" . #f) . ((choseong-hieuh . 1)))
- (("/" . #f) . ((jungseong-o . 3)))
+ '(("`" . "*")
+ ("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))
+ ("e" (jungseong-yeo . 1))
+ ("r" (jungseong-ae . (1 4)))
+ ("t" (jungseong-eo . (1 4)))
+ ("y" (choseong-rieul . 1))
+ ("u" (choseong-digeud . (3 5)))
+ ("i" (choseong-mieum . 1))
+ ("o" (choseong-chieuch . 1))
+ ("p" (choseong-pieup . 1))
+ ("[" . "(")
+ ("]" . "<")
+ ("\\" . ":")
+ ("a" (jongseong-ieung . 1))
+ ("s" (jongseong-nieun . 3))
+ ("d" (jungseong-i . (1 4)))
+ ("f" (jungseong-a . (1 4)))
+ ("g" (jungseong-eu . 3))
+ ("h" (choseong-nieun . 1))
+ ("j" (choseong-ieung . 1))
+ ("k" (choseong-giyeog . (3 5)))
+ ("l" (choseong-jieuj . (3 5)))
+ (";" (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))
+ ("n" (choseong-sios . (3 5)))
+ ("m" (choseong-hieuh . 1))
+ ("/" (jungseong-o . 3))
;; Shifted keys
- (("~" . #t) . 8251) ; U+203B, REFERENCE MARK
- (("!" . #t) . ((jongseong-ssanggiyeog . 5)))
- (("@" . #t) . ((jongseong-rieulgiyeog . 4)))
- (("#" . #t) . ((jongseong-jieuj . (1 4))))
- (("$" . #t) . ((jongseong-rieulpieup . 4)))
- (("%" . #t) . ((jongseong-rieultieut . 4)))
- (("^" . #t) . "=")
- (("&" . #t) . 8220) ; U+201C, LEFT DOUBLE QUOTATION MARK
- (("*" . #t) . 8221) ; U+201D, RIGHT DOUBLE QUOTATION MARK
- (("(" . #t) . "'")
- ((")" . #t) . "~")
- (("_" . #t) . ";")
- (("q" . #t) . ((jongseong-pieup . (1 4))))
- (("w" . #t) . ((jongseong-tieut . (1 4))))
- (("e" . #t) . ((jongseong-nieunjieuj . 4)))
- (("r" . #t) . ((jongseong-rieulhieuh . 4)))
- (("t" . #t) . ((jongseong-rieulsios . 4)))
- (("y" . #t) . "5")
- (("u" . #t) . "6")
- (("i" . #t) . "7")
- (("o" . #t) . "8")
- (("p" . #t) . "9")
- (("{" . #t) . "%")
- (("}" . #t) . "/")
- (("|" . #t) . "\\")
-;; (("|" . #t) . 8361) ; U+20A9, WON SIGN
- (("a" . #t) . ((jongseong-digeud . 1)))
- (("s" . #t) . ((jongseong-nieunhieuh . 4)))
- (("d" . #t) . ((jongseong-rieulbieub . 4)))
- (("f" . #t) . ((jongseong-rieulmieum . 4)))
- (("g" . #t) . ((jungseong-yae . 1)))
- (("h" . #t) . "0")
- (("j" . #t) . "1")
- (("k" . #t) . "2")
- (("l" . #t) . "3")
- ((":" . #t) . "4")
- (("\"" . #t) . 183) ; U+00B7, MIDDLE DOT
- (("z" . #t) . ((jongseong-chieuch . 1)))
- (("x" . #t) . ((jongseong-bieubsios . 4)))
- (("c" . #t) . ((jongseong-kieuk . 1)))
- (("v" . #t) . ((jongseong-giyeogsios . 4)))
- (("b" . #t) . "?")
- (("n" . #t) . "-")
- (("m" . #t) . "\"")
- (("<" . #t) . ",")
- ((">" . #t) . ".")
- (("?" . #t) . "!"))))
+ ("~" . 8251) ; U+203B, REFERENCE MARK
+ ("!" (jongseong-ssanggiyeog . 5))
+ ("@" (jongseong-rieulgiyeog . 4))
+ ("#" (jongseong-jieuj . (1 4)))
+ ("$" (jongseong-rieulpieup . 4))
+ ("%" (jongseong-rieultieut . 4))
+ ("^" . "=")
+ ("&" . 8220) ; U+201C, LEFT DOUBLE QUOTATION MARK
+ ("*" . 8221) ; U+201D, RIGHT DOUBLE QUOTATION MARK
+ ("(" . "'")
+ (")" . "~")
+ ("_" . ";")
+ ("Q" (jongseong-pieup . (1 4)))
+ ("W" (jongseong-tieut . (1 4)))
+ ("E" (jongseong-nieunjieuj . 4))
+ ("R" (jongseong-rieulhieuh . 4))
+ ("T" (jongseong-rieulsios . 4))
+ ("Y" . "5")
+ ("U" . "6")
+ ("I" . "7")
+ ("O" . "8")
+ ("P" . "9")
+ ("{" . "%")
+ ("}" . "/")
+ ("|" . "\\")
+;; ("|" . 8361) ; U+20A9, WON SIGN
+ ("A" (jongseong-digeud . 1))
+ ("S" (jongseong-nieunhieuh . 4))
+ ("D" (jongseong-rieulbieub . 4))
+ ("F" (jongseong-rieulmieum . 4))
+ ("G" (jungseong-yae . 1))
+ ("H" . "0")
+ ("J" . "1")
+ ("K" . "2")
+ ("L" . "3")
+ (":" . "4")
+ ("\"". 183) ; U+00B7, MIDDLE DOT
+ ("Z" (jongseong-chieuch . 1))
+ ("X" (jongseong-bieubsios . 4))
+ ("C" (jongseong-kieuk . 1))
+ ("V" (jongseong-giyeogsios . 4))
+ ("B" . "?")
+ ("N" . "-")
+ ("M" . "\"")
+ ("<" . ",")
+ (">" . ".")
+ ("?" . "!"))))
(define byeoru-layout-strict390
(byeoru-expand-layout
;; Unshifted keys
- '((("1" . #f) . ((jongseong-hieuh . 1)))
- (("2" . #f) . ((jongseong-ssangsios . 5)))
- (("3" . #f) . ((jongseong-bieub . (1 4))))
- (("4" . #f) . ((jungseong-yo . 1)))
- (("5" . #f) . ((jungseong-yu . 1)))
- (("6" . #f) . ((jungseong-ya . 1)))
- (("7" . #f) . ((jungseong-ye . 1)))
- (("8" . #f) . ((jungseong-ui . 4)))
- (("9" . #f) . ((jungseong-u . 2)))
- (("0" . #f) . ((choseong-kieuk . 1)))
- (("q" . #f) . ((jongseong-sios . (1 4))))
- (("w" . #f) . ((jongseong-rieul . 3)))
- (("e" . #f) . ((jungseong-yeo . 1)))
- (("r" . #f) . ((jungseong-ae . (1 4))))
- (("t" . #f) . ((jungseong-eo . (1 4))))
- (("y" . #f) . ((choseong-rieul . 1)))
- (("u" . #f) . ((choseong-digeud . (3 5))))
- (("i" . #f) . ((choseong-mieum . 1)))
- (("o" . #f) . ((choseong-chieuch . 1)))
- (("p" . #f) . ((choseong-pieup . 1)))
- (("a" . #f) . ((jongseong-ieung . 1)))
- (("s" . #f) . ((jongseong-nieun . 3)))
- (("d" . #f) . ((jungseong-i . (1 4))))
- (("f" . #f) . ((jungseong-a . (1 4))))
- (("g" . #f) . ((jungseong-eu . 1)))
- (("h" . #f) . ((choseong-nieun . 1)))
- (("j" . #f) . ((choseong-ieung . 1)))
- (("k" . #f) . ((choseong-giyeog . (3 5))))
- (("l" . #f) . ((choseong-jieuj . (3 5))))
- ((";" . #f) . ((choseong-bieub . (3 5))))
- (("'" . #f) . ((choseong-tieut . 1)))
- (("z" . #f) . ((jongseong-mieum . 1)))
- (("x" . #f) . ((jongseong-giyeog . 3)))
- (("c" . #f) . ((jungseong-e . (1 4))))
- (("v" . #f) . ((jungseong-o . 1)))
- (("b" . #f) . ((jungseong-u . 1)))
- (("n" . #f) . ((choseong-sios . (3 5))))
- (("m" . #f) . ((choseong-hieuh . 1)))
- (("/" . #f) . ((jungseong-o . 2)))
+ '(("1" (jongseong-hieuh . 1))
+ ("2" (jongseong-ssangsios . 5))
+ ("3" (jongseong-bieub . (1 4)))
+ ("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 4)))
+ ("w" (jongseong-rieul . 3))
+ ("e" (jungseong-yeo . 1))
+ ("r" (jungseong-ae . (1 4)))
+ ("t" (jungseong-eo . (1 4)))
+ ("y" (choseong-rieul . 1))
+ ("u" (choseong-digeud . (3 5)))
+ ("i" (choseong-mieum . 1))
+ ("o" (choseong-chieuch . 1))
+ ("p" (choseong-pieup . 1))
+ ("a" (jongseong-ieung . 1))
+ ("s" (jongseong-nieun . 3))
+ ("d" (jungseong-i . (1 4)))
+ ("f" (jungseong-a . (1 4)))
+ ("g" (jungseong-eu . 1))
+ ("h" (choseong-nieun . 1))
+ ("j" (choseong-ieung . 1))
+ ("k" (choseong-giyeog . (3 5)))
+ ("l" (choseong-jieuj . (3 5)))
+ (";" (choseong-bieub . (3 5)))
+ ("'" (choseong-tieut . 1))
+ ("z" (jongseong-mieum . 1))
+ ("x" (jongseong-giyeog . 3))
+ ("c" (jungseong-e . (1 4)))
+ ("v" (jungseong-o . 1))
+ ("b" (jungseong-u . 1))
+ ("n" (choseong-sios . (3 5)))
+ ("m" (choseong-hieuh . 1))
+ ("/" (jungseong-o . 2))
;; Shifted keys
- (("!" . #t) . ((jongseong-jieuj . (1 4))))
- (("q" . #t) . ((jongseong-pieup . (1 4))))
- (("w" . #t) . ((jongseong-tieut . (1 4))))
- (("e" . #t) . ((jongseong-kieuk . 1)))
- (("r" . #t) . ((jungseong-yae . 1)))
- (("t" . #t) . ";")
- (("y" . #t) . "<")
- (("u" . #t) . "7")
- (("i" . #t) . "8")
- (("o" . #t) . "9")
- (("p" . #t) . ">")
- (("a" . #t) . ((jongseong-digeud . 1)))
- (("s" . #t) . ((jongseong-nieunhieuh . 4)))
- (("d" . #t) . ((jongseong-rieulgiyeog . 4)))
- (("f" . #t) . ((jongseong-ssanggiyeog . 5)))
- (("g" . #t) . "/")
- (("h" . #t) . "'")
- (("j" . #t) . "4")
- (("k" . #t) . "5")
- (("l" . #t) . "6")
- (("z" . #t) . ((jongseong-chieuch . 1)))
- (("x" . #t) . ((jongseong-bieubsios . 4)))
- (("c" . #t) . ((jongseong-rieulmieum . 4)))
- (("v" . #t) . ((jongseong-rieulhieuh . 4)))
- (("b" . #t) . "!")
- (("n" . #t) . "0")
- (("m" . #t) . "1")
- (("<" . #t) . "2")
- ((">" . #t) . "3"))))
+ ("!" (jongseong-jieuj . (1 4)))
+ ("Q" (jongseong-pieup . (1 4)))
+ ("W" (jongseong-tieut . (1 4)))
+ ("E" (jongseong-kieuk . 1))
+ ("R" (jungseong-yae . 1))
+ ("T" . ";")
+ ("Y" . "<")
+ ("U" . "7")
+ ("I" . "8")
+ ("O" . "9")
+ ("P" . ">")
+ ("A" (jongseong-digeud . 1))
+ ("S" (jongseong-nieunhieuh . 4))
+ ("D" (jongseong-rieulgiyeog . 4))
+ ("F" (jongseong-ssanggiyeog . 5))
+ ("G" . "/")
+ ("H" . "'")
+ ("J" . "4")
+ ("K" . "5")
+ ("L" . "6")
+ ("Z" (jongseong-chieuch . 1))
+ ("X" (jongseong-bieubsios . 4))
+ ("C" (jongseong-rieulmieum . 4))
+ ("V" (jongseong-rieulhieuh . 4))
+ ("B" . "!")
+ ("N" . "0")
+ ("M" . "1")
+ ("<" . "2")
+ (">" . "3"))))
(define byeoru-layout-generous390
(byeoru-expand-layout
;; Unshifted keys
- '((("1" . #f) . ((jongseong-hieuh . (1 4))))
- (("2" . #f) . ((jongseong-ssangsios . 5)))
- (("3" . #f) . ((jongseong-bieub . (3 4))))
- (("4" . #f) . ((jungseong-yo . 1)))
- (("5" . #f) . ((jungseong-yu . 1)))
- (("6" . #f) . ((jungseong-ya . 1)))
- (("7" . #f) . ((jungseong-ye . 1)))
- (("8" . #f) . ((jungseong-ui . 4)))
- (("9" . #f) . ((jungseong-u . 3)))
- (("0" . #f) . ((choseong-kieuk . 1)))
- (("q" . #f) . ((jongseong-sios . (3 4 5))))
- (("w" . #f) . ((jongseong-rieul . 3)))
- (("e" . #f) . ((jungseong-yeo . 1)))
- (("r" . #f) . ((jungseong-ae . (1 4))))
- (("t" . #f) . ((jungseong-eo . (1 4))))
- (("y" . #f) . ((choseong-rieul . 1)))
- (("u" . #f) . ((choseong-digeud . (3 5))))
- (("i" . #f) . ((choseong-mieum . 1)))
- (("o" . #f) . ((choseong-chieuch . 1)))
- (("p" . #f) . ((choseong-pieup . 1)))
- (("a" . #f) . ((jongseong-ieung . 1)))
- (("s" . #f) . ((jongseong-nieun . 3)))
- (("d" . #f) . ((jungseong-i . (1 4))))
- (("f" . #f) . ((jungseong-a . (1 4))))
- (("g" . #f) . ((jungseong-eu . 3)))
- (("h" . #f) . ((choseong-nieun . 1)))
- (("j" . #f) . ((choseong-ieung . 1)))
- (("k" . #f) . ((choseong-giyeog . (3 5))))
- (("l" . #f) . ((choseong-jieuj . (3 5))))
- ((";" . #f) . ((choseong-bieub . (3 5))))
- (("'" . #f) . ((choseong-tieut . 1)))
- (("z" . #f) . ((jongseong-mieum . (1 4))))
- (("x" . #f) . ((jongseong-giyeog . (3 4 5))))
- (("c" . #f) . ((jungseong-e . (1 4))))
- (("v" . #f) . ((jungseong-o . 3)))
- (("b" . #f) . ((jungseong-u . 3)))
- (("n" . #f) . ((choseong-sios . (3 5))))
- (("m" . #f) . ((choseong-hieuh . 1)))
- (("/" . #f) . ((jungseong-o . 3)))
+ '(("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))
+ ("e" (jungseong-yeo . 1))
+ ("r" (jungseong-ae . (1 4)))
+ ("t" (jungseong-eo . (1 4)))
+ ("y" (choseong-rieul . 1))
+ ("u" (choseong-digeud . (3 5)))
+ ("i" (choseong-mieum . 1))
+ ("o" (choseong-chieuch . 1))
+ ("p" (choseong-pieup . 1))
+ ("a" (jongseong-ieung . 1))
+ ("s" (jongseong-nieun . 3))
+ ("d" (jungseong-i . (1 4)))
+ ("f" (jungseong-a . (1 4)))
+ ("g" (jungseong-eu . 3))
+ ("h" (choseong-nieun . 1))
+ ("j" (choseong-ieung . 1))
+ ("k" (choseong-giyeog . (3 5)))
+ ("l" (choseong-jieuj . (3 5)))
+ (";" (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))
+ ("n" (choseong-sios . (3 5)))
+ ("m" (choseong-hieuh . 1))
+ ("/" (jungseong-o . 3))
;; Shifted keys
- (("!" . #t) . ((jongseong-jieuj . (1 4))))
- (("q" . #t) . ((jongseong-pieup . (1 4))))
- (("w" . #t) . ((jongseong-tieut . (1 4))))
- (("e" . #t) . ((jongseong-kieuk . 1)))
- (("r" . #t) . ((jungseong-yae . 1)))
- (("t" . #t) . ";")
- (("y" . #t) . "<")
- (("u" . #t) . "7")
- (("i" . #t) . "8")
- (("o" . #t) . "9")
- (("p" . #t) . ">")
- (("a" . #t) . ((jongseong-digeud . 1)))
- (("s" . #t) . ((jongseong-nieunhieuh . 4)))
- (("d" . #t) . ((jongseong-rieulgiyeog . 4)))
- (("f" . #t) . ((jongseong-ssanggiyeog . 5)))
- (("g" . #t) . "/")
- (("h" . #t) . "'")
- (("j" . #t) . "4")
- (("k" . #t) . "5")
- (("l" . #t) . "6")
- (("z" . #t) . ((jongseong-chieuch . 1)))
- (("x" . #t) . ((jongseong-bieubsios . 4)))
- (("c" . #t) . ((jongseong-rieulmieum . 4)))
- (("v" . #t) . ((jongseong-rieulhieuh . 4)))
- (("b" . #t) . "!")
- (("n" . #t) . "0")
- (("m" . #t) . "1")
- (("<" . #t) . "2")
- ((">" . #t) . "3"))))
+ ("!" (jongseong-jieuj . (1 4)))
+ ("Q" (jongseong-pieup . (1 4)))
+ ("W" (jongseong-tieut . (1 4)))
+ ("E" (jongseong-kieuk . 1))
+ ("R" (jungseong-yae . 1))
+ ("T" . ";")
+ ("Y" . "<")
+ ("U" . "7")
+ ("I" . "8")
+ ("O" . "9")
+ ("P" . ">")
+ ("A" (jongseong-digeud . 1))
+ ("S" (jongseong-nieunhieuh . 4))
+ ("D" (jongseong-rieulgiyeog . 4))
+ ("F" (jongseong-ssanggiyeog . 5))
+ ("G" . "/")
+ ("H" . "'")
+ ("J" . "4")
+ ("K" . "5")
+ ("L" . "6")
+ ("Z" (jongseong-chieuch . 1))
+ ("X" (jongseong-bieubsios . 4))
+ ("C" (jongseong-rieulmieum . 4))
+ ("V" (jongseong-rieulhieuh . 4))
+ ("B" . "!")
+ ("N" . "0")
+ ("M" . "1")
+ ("<" . "2")
+ (">" . "3"))))
(define byeoru-layout-no-shift
(byeoru-expand-layout
;; Unshifted keys
- '((("`" . #f) . 183)
- (("1" . #f) . ((jongseong-hieuh . (1 4))))
- (("2" . #f) . ((jongseong-ssangsios . 5)))
- (("3" . #f) . ((jongseong-bieub . (3 4))))
- (("4" . #f) . ((jungseong-yo . 1)))
- (("5" . #f) . ((jungseong-yu . 1)))
- (("6" . #f) . ((jungseong-ya . 1)))
- (("7" . #f) . ((jungseong-ye . 1)))
- (("8" . #f) . ((jungseong-ui . 4)))
- (("9" . #f) . ((choseong-kieuk . 1)))
- (("0" . #f) . ((jungseong-yae . 1)))
- (("-" . #f) . ((jongseong-jieuj . (1 4))))
- (("=" . #f) . ((jongseong-chieuch . 1)))
- (("q" . #f) . ((jongseong-sios . (3 4 5))))
- (("w" . #f) . ((jongseong-rieul . 3)))
- (("e" . #f) . ((jungseong-yeo . 1)))
- (("r" . #f) . ((jungseong-ae . (1 4))))
- (("t" . #f) . ((jungseong-eo . (1 4))))
- (("y" . #f) . ((choseong-rieul . 1)))
- (("u" . #f) . ((choseong-digeud . (3 5))))
- (("i" . #f) . ((choseong-mieum . 1)))
- (("o" . #f) . ((choseong-chieuch . 1)))
- (("p" . #f) . ((choseong-pieup . 1)))
- (("[" . #f) . ((jongseong-tieut . (1 4))))
- (("]" . #f) . ((jongseong-pieup . (1 4))))
- (("\\" . #f) . ((jongseong-kieuk . 1)))
- (("a" . #f) . ((jongseong-ieung . 1)))
- (("s" . #f) . ((jongseong-nieun . 3)))
- (("d" . #f) . ((jungseong-i . (1 4))))
- (("f" . #f) . ((jungseong-a . (1 4))))
- (("g" . #f) . ((jungseong-eu . 3)))
- (("h" . #f) . ((choseong-nieun . 1)))
- (("j" . #f) . ((choseong-ieung . 1)))
- (("k" . #f) . ((choseong-giyeog . (3 5))))
- (("l" . #f) . ((choseong-jieuj . (3 5))))
- ((";" . #f) . ((choseong-bieub . (3 5))))
- (("'" . #f) . ((choseong-tieut . 1)))
- (("z" . #f) . ((jongseong-mieum . (1 4))))
- (("x" . #f) . ((jongseong-giyeog . (3 4 5))))
- (("c" . #f) . ((jungseong-e . (1 4))))
- (("v" . #f) . ((jungseong-o . 3)))
- (("b" . #f) . ((jungseong-u . 3)))
- (("n" . #f) . ((choseong-sios . (3 5))))
- (("m" . #f) . ((choseong-hieuh . 1)))
- (("/" . #f) . ((jongseong-digeud . 1)))
+ '(("`" . 183)
+ ("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" (choseong-kieuk . 1))
+ ("0" (jungseong-yae . 1))
+ ("-" (jongseong-jieuj . (1 4)))
+ ("=" (jongseong-chieuch . 1))
+ ("q" (jongseong-sios . (3 4 5)))
+ ("w" (jongseong-rieul . 3))
+ ("e" (jungseong-yeo . 1))
+ ("r" (jungseong-ae . (1 4)))
+ ("t" (jungseong-eo . (1 4)))
+ ("y" (choseong-rieul . 1))
+ ("u" (choseong-digeud . (3 5)))
+ ("i" (choseong-mieum . 1))
+ ("o" (choseong-chieuch . 1))
+ ("p" (choseong-pieup . 1))
+ ("[" (jongseong-tieut . (1 4)))
+ ("]" (jongseong-pieup . (1 4)))
+ ("\\" (jongseong-kieuk . 1))
+ ("a" (jongseong-ieung . 1))
+ ("s" (jongseong-nieun . 3))
+ ("d" (jungseong-i . (1 4)))
+ ("f" (jungseong-a . (1 4)))
+ ("g" (jungseong-eu . 3))
+ ("h" (choseong-nieun . 1))
+ ("j" (choseong-ieung . 1))
+ ("k" (choseong-giyeog . (3 5)))
+ ("l" (choseong-jieuj . (3 5)))
+ (";" (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))
+ ("n" (choseong-sios . (3 5)))
+ ("m" (choseong-hieuh . 1))
+ ("/" (jongseong-digeud . 1))
;; Shifted keys
- (("q" . #t) . ((jongseong-sios . (3 4 5))))
- (("w" . #t) . ((jongseong-rieul . 3)))
- (("e" . #t) . ((jungseong-yeo . 1)))
- (("r" . #t) . ((jungseong-ae . (1 4))))
- (("t" . #t) . ";")
- (("y" . #t) . "<")
- (("u" . #t) . "7")
- (("i" . #t) . "8")
- (("o" . #t) . "9")
- (("p" . #t) . ">")
- (("a" . #t) . ((jongseong-ieung . 1)))
- (("s" . #t) . "[")
- (("d" . #t) . "]")
- (("f" . #t) . ((jungseong-a . (1 4))))
- (("g" . #t) . "/")
- (("h" . #t) . "'")
- (("j" . #t) . "4")
- (("k" . #t) . "5")
- (("l" . #t) . "6")
- (("z" . #t) . "-")
- (("x" . #t) . "=")
- (("c" . #t) . "\\")
- (("v" . #t) . ((jungseong-o . 3)))
- (("b" . #t) . "!")
- (("n" . #t) . "0")
- (("m" . #t) . "1")
- (("<" . #t) . "2")
- ((">" . #t) . "3"))))
+ ("Q" (jongseong-sios . (3 4 5)))
+ ("W" (jongseong-rieul . 3))
+ ("E" (jungseong-yeo . 1))
+ ("R" (jungseong-ae . (1 4)))
+ ("T" . ";")
+ ("Y" . "<")
+ ("U" . "7")
+ ("I" . "8")
+ ("O" . "9")
+ ("P" . ">")
+ ("A" (jongseong-ieung . 1))
+ ("S" . "[")
+ ("D" . "]")
+ ("F" (jungseong-a . (1 4)))
+ ("G" . "/")
+ ("H" . "'")
+ ("J" . "4")
+ ("K" . "5")
+ ("L" . "6")
+ ("Z" . "-")
+ ("X" . "=")
+ ("C" . "\\")
+ ("V" (jungseong-o . 3))
+ ("B" . "!")
+ ("N" . "0")
+ ("M" . "1")
+ ("<" . "2")
+ (">" . "3"))))
(define-record 'byeoru-automata
'((state-history ((start . 0)))
@@ -1000,54 +993,40 @@
(jong (nth 2 johab)))
(+ byeoru-ucs-code-ga (* (- cho 1) 21 28) (* (- jung 1) 28) jong)))
-;; Should this be done here, or somewhere in the library?
-(define (byeoru-ucs-to-utf-8-string ucs)
- (let ((utf-8
- (if (< ucs 128)
- (list ucs) ; ASCII
- (let enc ((to-be-split ucs)
- (threshold 64))
- (if (< to-be-split threshold)
- (list (bit-or to-be-split
- (bit-xor 255 (- (* 2 threshold) 1))))
- (cons (bit-or 128 (bit-and 63 to-be-split))
- (enc (/ to-be-split 64) (/ threshold 2))))))))
- (string-append-map charcode->string (reverse utf-8))))
-
;; This is the way an isolated jamo is encoded in the Unicode standard.
;; However, it doesn't seem to be well supported currently.
(define byeoru-choseong-jamo-utf-8-list
- (map byeoru-ucs-to-utf-8-string
+ (map ucs-to-utf8-string
(cons byeoru-ucs-code-choseong-filler
(list-tabulate
19 (lambda (n) (+ n byeoru-ucs-code-choseong-giyeog))))))
(define byeoru-jungseong-jamo-utf-8-list
- (map byeoru-ucs-to-utf-8-string
+ (map ucs-to-utf8-string
(cons byeoru-ucs-code-jungseong-filler
(list-tabulate
21 (lambda (n) (+ n byeoru-ucs-code-jungseong-a))))))
(define byeoru-jongseong-jamo-utf-8-list
- (cons "" (map byeoru-ucs-to-utf-8-string
+ (cons "" (map ucs-to-utf8-string
(list-tabulate
27 (lambda (n) (+ n byeoru-ucs-code-jongseong-giyeog))))))
;; So we show an incomplete syllable as a sequence of
;; Hangul compatibility jamos by default.
(define byeoru-choseong-compatibility-jamo-utf-8-list
- (cons "" (map byeoru-ucs-to-utf-8-string
+ (cons "" (map ucs-to-utf8-string
'(12593 12594 12596 12599 12600 12601 12609 12610 12611 12613
12614 12615 12616 12617 12618 12619 12620 12621 12622))))
(define byeoru-jungseong-compatibility-jamo-utf-8-list
- (cons "" (map byeoru-ucs-to-utf-8-string
+ (cons "" (map ucs-to-utf8-string
'(12623 12624 12625 12626 12627 12628 12629 12630 12631 12632
12633 12634 12635 12636 12637 12638 12639 12640 12641 12642
12643))))
(define byeoru-jongseong-compatibility-jamo-utf-8-list
- (cons "" (map byeoru-ucs-to-utf-8-string
+ (cons "" (map ucs-to-utf8-string
'(12593 12594 12595 12596 12597 12598 12599 12601 12602 12603
12604 12605 12606 12607 12608 12609 12610 12612 12613 12614
12615 12616 12618 12619 12620 12621 12622))))
@@ -1061,7 +1040,7 @@
"")
;; We are basically using Normalization Form C.
((and (not (= cho 0)) (not (= jung 0)))
- (byeoru-ucs-to-utf-8-string (byeoru-johab-to-ucs johab)))
+ (ucs-to-utf8-string (byeoru-johab-to-ucs johab)))
(else
(let ((cho-l (if byeoru-compatibility-jamos-for-incomplete-syllables?
byeoru-choseong-compatibility-jamo-utf-8-list
@@ -1080,7 +1059,6 @@
;;; Input context handlers
;;; ------------------------
-;; CHECK against HWP again.
(define byeoru-romaja-rule
(byeoru-expand-layout
'(((("g")) ((choseong-giyeog . (3 5)) (jongseong-giyeog . (3 4 5))))
@@ -1223,8 +1201,8 @@
'(figure_ko_direct
"A"
;; Change this to a more reasonable name.
- "영숫자"
- "영숫자 입력모드"))
+ "영문"
+ "영문 입력모드"))
(lambda (bc)
(not (byeoru-context-on bc)))
(lambda (bc)
@@ -1278,16 +1256,18 @@
(define (byeoru-key-to-candidates key key-state)
(let* ((layout (symbol-value byeoru-layout))
(pressed-key
- (cons (charcode->string (to-lower-char key))
- ;; CHECK: is this "if" necessary under sigscheme?
- (if (shift-key-mask key-state) #t #f)))
+ (charcode->string
+ ;; avoid case change due to caps lock.
+ (if (shift-key-mask key-state)
+ (char-upcase key) (char-downcase key))))
(entry (assoc pressed-key layout)))
(and entry
(let ((candidates (cdr entry)))
(if (number? candidates)
- (byeoru-ucs-to-utf-8-string candidates)
+ (ucs-to-utf8-string candidates)
candidates)))))
+(define byeoru-dic-filename "byeoru-dic.scm")
(define byeoru-load-dic-hook '())
(define byeoru-dic-loaded? #f)
@@ -1300,7 +1280,7 @@
(define (byeoru-look-up-dic word)
(if (not byeoru-dic-loaded?)
(begin
- (require "byeoru-dic.scm")
+ (require byeoru-dic-filename)
(byeoru-call-hook-procs byeoru-load-dic-hook)
(set! byeoru-dic-loaded? #t)))
(assoc word byeoru-dic))
@@ -1356,6 +1336,7 @@
(byeoru-context-set-cands! bc (cdr entry))
(byeoru-context-set-mode! bc 'conv)
(byeoru-update-preedit bc)
+ ;; CHECK: is the following statement true?
;; We should update the preedit to place the candidate window
;; at a correct position.
(im-activate-candidate-selector bc max byeoru-nr-candidate-max)
@@ -1373,7 +1354,15 @@
(byeoru-commit bc (byeoru-make-whole-string bc))
(byeoru-clear! bc)))))
-;; Add more comments.
+;; Yes, I know this routine is ugly, but it works!
+;; This procedure uses an rk to translate, according to
+;; byeoru-romaja-rule, a sequence of romaja keys to a list of possible
+;; jamos, which is fed into a Hangul automata. When a new romaja key
+;; is pressed, the last-pressed key in the automata is backspaced and
+;; the updated key from the rk is pushed into the automata, until the
+;; rk sequence can grow no longer. It keeps track of the history of
+;; romaja key presses since the backspace key is supposed to delete a
+;; romaja, not a jamo.
(define (byeoru-feed-romaja-key bc key key-state)
(and
(or (not (modifier-key-mask key-state))
@@ -1693,7 +1682,7 @@
((symbol)
(let* ((cand (nth (byeoru-context-cand-no bc) cands))
(str (if (number? cand)
- (byeoru-ucs-to-utf-8-string cand)
+ (ucs-to-utf8-string cand)
cand))
(menu-item (nth (- (byeoru-context-menu-no bc) (length cache))
byeoru-menu-symbols)))
@@ -1733,12 +1722,14 @@
(define (byeoru-converting-state-preedit bc)
(let ((convl (byeoru-context-convl-ustr bc))
(convr (byeoru-context-convr-ustr bc))
- (word (byeoru-context-word-ustr bc)))
+ (word (byeoru-context-word-ustr bc))
+ (underline
+ (if (byeoru-context-commit-by-word? bc) preedit-underline 0)))
(list
(and (not (ustr-cursor-at-beginning? convl))
(cons preedit-underline
(apply string-append (ustr-former-seq convl))))
- (cons (bit-or preedit-reverse preedit-cursor) ; preedit-reverse
+ (cons (bit-or preedit-reverse underline preedit-cursor)
(apply string-append (ustr-former-seq convr)))
(and (not (ustr-cursor-at-end? convr))
(cons preedit-underline
@@ -1749,10 +1740,15 @@
(apply string-append (ustr-latter-seq word)))))))
(define (byeoru-input-state-preedit bc)
- (let* ((word (byeoru-context-word-ustr bc))
- (ba (byeoru-context-automata bc))
- (composing (byeoru-johab-to-utf-8-string
- (byeoru-automata-composing-char ba))))
+ (let ((word (byeoru-context-word-ustr bc))
+ (composing (byeoru-johab-to-utf-8-string
+ (byeoru-automata-composing-char
+ (byeoru-context-automata bc))))
+;; Underlining a composing character leads to a confusing appearance.
+;; This should be made customizable.
+;; (underline
+;; (if (byeoru-context-commit-by-word? bc) preedit-underline 0))
+ )
(list
(and (not (ustr-cursor-at-beginning? word))
(cons preedit-underline
@@ -1815,7 +1811,7 @@
(list (if (byeoru-context-commit-by-word? bc) "글자단위" "단어단위")
(digit->string (+ idx 1)) ""))
((number? cand)
- (list (byeoru-ucs-to-utf-8-string cand)
+ (list (ucs-to-utf8-string cand)
(digit->string (+ idx 1)) ""))
((string? cand)
;; What's the use of the last ""?
More information about the uim-commit
mailing list