summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChoe Hwanjin <choe.hwanjin@gmail.com>2010-12-25 12:37:02 +0900
committerChoe Hwanjin <choe.hwanjin@gmail.com>2010-12-25 12:37:02 +0900
commite2e71952e1fb177b02a4ba2df3c19df9228d1d59 (patch)
tree1a79f82b709834b64080bc7cde38dc7559c641d6
parent582e2d306cbd8fb501a4f728e400bc75fb6574b1 (diff)
downloadlibhangul-e2e71952e1fb177b02a4ba2df3c19df9228d1d59.tar.gz
한글 두벌식 옛글 자판 초기 구현
자판의 배열을 아래한글의 두벌식 옛글자판과 동일하게 맞추었다. 초성과 종성을 뒤바꾸는 코드에서 UNICODE 5.2 버전의 옛한글을 지원하도록 하였다. 기존 두벌식에서 사용하던 hangul_jongseong_dicompose() 함수로는 옛한글 처리를 할 수가 없으므로 새로이 hangul_jongseong_get_diff() 함수를 구현하고, 이 함수를 이용하여 구현을 변경하였다. 그러나 아직 버그가 있으므로 차츰 수정해 나가도록 한다. 또한 옛한글을 지원하는 과정에서 현대 한글 두벌식 자판에도 영향을 미쳤으므로 이 역시 차츰 수정해 나가도록 한다. git-svn-id: http://kldp.net/svn/hangul/libhangul/trunk@235 8f00fcd2-89fc-0310-932e-b01be5b65e01
-rw-r--r--hangul/hangulctype.c666
-rw-r--r--hangul/hangulinputcontext.c37
-rw-r--r--hangul/hangulinternals.h2
-rw-r--r--hangul/hangulkeyboard.h131
4 files changed, 771 insertions, 65 deletions
diff --git a/hangul/hangulctype.c b/hangul/hangulctype.c
index 50779d2..54c10a4 100644
--- a/hangul/hangulctype.c
+++ b/hangul/hangulctype.c
@@ -602,67 +602,297 @@ hangul_jaso_to_jamo(ucschar c)
ucschar
hangul_choseong_to_jongseong(ucschar c)
{
- static ucschar table[] = {
- 0x11a8, /* choseong kiyeok -> jongseong kiyeok */
- 0x11a9, /* choseong ssangkiyeok -> jongseong ssangkiyeok */
- 0x11ab, /* choseong nieun -> jongseong nieun */
- 0x11ae, /* choseong tikeut -> jongseong tikeut */
- 0x0, /* choseong ssangtikeut -> jongseong tikeut */
- 0x11af, /* choseong rieul -> jongseong rieul */
- 0x11b7, /* choseong mieum -> jongseong mieum */
- 0x11b8, /* choseong pieup -> jongseong pieup */
- 0x0, /* choseong ssangpieup -> jongseong pieup */
- 0x11ba, /* choseong sios -> jongseong sios */
- 0x11bb, /* choseong ssangsios -> jongseong ssangsios */
- 0x11bc, /* choseong ieung -> jongseong ieung */
- 0x11bd, /* choseong cieuc -> jongseong cieuc */
- 0x0, /* choseong ssangcieuc -> jongseong cieuc */
- 0x11be, /* choseong chieuch -> jongseong chieuch */
- 0x11bf, /* choseong khieukh -> jongseong khieukh */
- 0x11c0, /* choseong thieuth -> jongseong thieuth */
- 0x11c1, /* choseong phieuph -> jongseong phieuph */
- 0x11c2 /* choseong hieuh -> jongseong hieuh */
+ static const ucschar table[] = {
+ 0x11a8, /* cho kiyeok -> jong kiyeok */
+ 0x11a9, /* cho ssangkiyeok -> jong ssangkiyeok */
+ 0x11ab, /* cho nieun -> jong nieun */
+ 0x11ae, /* cho tikeut -> jong tikeut */
+ 0xd7cd, /* cho ssangtikeut -> jong ssangtikeut */
+ 0x11af, /* cho rieul -> jong rieul */
+ 0x11b7, /* cho mieum -> jong mieum */
+ 0x11b8, /* cho pieup -> jong pieup */
+ 0xd7e6, /* cho ssangpieup -> jong ssangpieup */
+ 0x11ba, /* cho sios -> jong sios */
+ 0x11bb, /* cho ssangsios -> jong ssangsios */
+ 0x11bc, /* cho ieung -> jong ieung */
+ 0x11bd, /* cho cieuc -> jong cieuc */
+ 0xd7f9, /* cho ssangcieuc -> jong ssangcieuc */
+ 0x11be, /* cho chieuch -> jong chieuch */
+ 0x11bf, /* cho khieukh -> jong khieukh */
+ 0x11c0, /* cho thieuth -> jong thieuth */
+ 0x11c1, /* cho phieuph -> jong phieuph */
+ 0x11c2, /* cho hieuh -> jong hieuh */
+ 0x11c5, /* cho nieun-kiyeok -> jong nieun-kiyeok */
+ 0x11ff, /* cho ssangnieun -> jong ssangnieun */
+ 0x11c6, /* cho nieun-tikeut -> jong nieun-tikeut */
+ 0, /* cho nieun-pieup */
+ 0x11ca, /* cho tikeut-kiyeok -> jong tikeut-kiyeok */
+ 0x11cd, /* cho rieul-nieun -> jong rieul-nieun */
+ 0x11d0, /* cho ssangrieul -> jong ssangrieul */
+ 0x11b6, /* cho rieul-hieuh -> jong rieul-hieuh */
+ 0xd7dd, /* cho kapyeounrieul -> jong kapyeounrieul */
+ 0x11dc, /* cho mieum-pieup -> jong mieum-pieup */
+ 0x11e2, /* cho kapyeounmieum -> jong kapyeounmieum */
+ 0, /* cho pieup-kiyeok */
+ 0, /* cho pieup-nieun */
+ 0xd7e3, /* cho pieup-tikeut -> jong pieup-tikeut */
+ 0x11b9, /* cho pieup-sios -> jong pieup-sios */
+ 0, /* cho pieup-sios-kiyeok */
+ 0xd7e7, /* cho pieup-sios-tikeut -> jong pieup-sios-tikeut */
+ 0, /* cho pieup-sios-pieup */
+ 0, /* cho pieup-ssangsios */
+ 0, /* cho pieup-sios-cieuc */
+ 0xd7e8, /* cho pieup-cieuc -> jong pieup-cieuc */
+ 0xd7e9, /* cho pieup-chieuch -> jong pieup-chieuch */
+ 0, /* cho pieup-thieuth */
+ 0x11e4, /* cho pieup-phieuph -> jong pieup-phieuph */
+ 0x11e6, /* cho kapyeounpieup -> jong kapyeounpieup */
+ 0, /* cho kapyeounssangpieup */
+ 0x11e7, /* cho sios-kiyeok -> jong sios-kiyeok */
+ 0, /* cho sios-nieun */
+ 0x11e8, /* cho sios-tikeut -> jong sios-tikeut */
+ 0x11e9, /* cho sios-rieul -> jong sios-rieul */
+ 0xd7ea, /* cho sios-mieum -> jong sios-mieum */
+ 0x11ea, /* cho sios-pieup -> jong sios-pieup */
+ 0, /* cho sios-pieup-kiyeok */
+ 0, /* cho sios-ssangsios */
+ 0, /* cho sios-ieung */
+ 0xd7ef, /* cho sios-cieuc -> jong sios-cieuc */
+ 0xd7f0, /* cho sios-chieuch -> jong sios-chieuch */
+ 0, /* cho sios-khieukh */
+ 0xd7f1, /* cho sios-thieuth -> jong sios-thieuth */
+ 0, /* cho sios-phieuph */
+ 0xd7f2, /* cho sios-hieuh -> jong sios-hieuh */
+ 0, /* cho chitueumsios */
+ 0, /* cho chitueumssangsios */
+ 0, /* cho ceongchieumsios */
+ 0, /* cho ceongchieumssangsios */
+ 0x11eb, /* cho pansios -> jong pansios */
+ 0x11ec, /* cho ieung-kiyeok -> jong ieung-kiyeok */
+ 0, /* cho ieung-tikeut */
+ 0, /* cho ieung-mieum */
+ 0, /* cho ieung-pieup */
+ 0, /* cho ieung-sios */
+ 0, /* cho ieung-pansios */
+ 0x11ee, /* cho ssangieung -> jong ssangieung */
+ 0, /* cho ieung-cieuc */
+ 0, /* cho ieung-chieuch */
+ 0, /* cho ieung-thieuth */
+ 0, /* cho ieung-phieuph */
+ 0x11f0, /* cho yesieung -> jong yesieung */
+ 0, /* cho cieuc-ieung */
+ 0, /* cho chitueumcieuc */
+ 0, /* cho chitueumssangcieuc */
+ 0, /* cho ceongchieumcieuc */
+ 0, /* cho ceongchieumssangcieuc */
+ 0, /* cho chieuch-khieukh */
+ 0, /* cho chieuch-hieuh */
+ 0, /* cho chitueumchieuch */
+ 0, /* cho ceongchieumchieuch */
+ 0x11f3, /* cho phieuph-pieup -> jong phieuph-pieup */
+ 0x11f4, /* cho kapyeounphieuph -> jong kapyeounphieuph */
+ 0, /* cho ssanghieuh */
+ 0x11f9, /* cho yeorinhieuh -> jong yeorinhieuh */
+ 0, /* cho kiyeok-tikeut */
+ 0x11c7, /* cho nieun-sios -> jong nieun-sios */
+ 0x11ac, /* cho nieun-cieuc -> jong nieun-cieuc */
+ 0x11ad, /* cho nieun-hieuh -> jong nieun-hieuh */
+ 0x11cb, /* cho tikeut-rieul -> jong tikeut-rieul */
+ 0, /* cho filler */
};
- if (c < 0x1100 || c > 0x1112)
- return 0;
- return table[c - 0x1100];
+
+ static const ucschar table_ext_a[] = {
+ 0, /* cho tikeut-mieum */
+ 0xd7cf, /* cho tikeut-pieup -> jong tikeut-pieup */
+ 0xd7d0, /* cho tikeut-sios -> jong tikeut-sios */
+ 0xd7d2, /* cho tikeut-cieuc -> jong tikeut-cieuc */
+ 0x11b0, /* cho rieul-kiyeok -> jong rieul-kiyeok */
+ 0xd7d5, /* cho rieul-ssangkiyeok -> jong rieul-ssangkiyeok */
+ 0x11ce, /* cho rieul-tikeut -> jong rieul-tikeut */
+ 0, /* cho rieul-ssangtikeut */
+ 0x11b1, /* cho rieul-mieum -> jong rieul-mieum */
+ 0x11b2, /* cho rieul-pieup -> jong rieul-pieup */
+ 0, /* cho rieul-ssangpieup */
+ 0x11d5, /* cho rieul-kapyeounpieup -> jong rieul-kapyeounpieup */
+ 0x11b3, /* cho rieul-sios -> jong rieul-sios */
+ 0, /* cho rieul-cieuc */
+ 0x11d8, /* cho rieul-khieukh -> jong rieul-khieukh */
+ 0x11da, /* cho mieum-kiyeok -> jong mieum-kiyeok */
+ 0, /* cho mieum-tikeut */
+ 0x11dd, /* cho mieum-sios -> jong mieum-sios */
+ 0, /* cho pieup-sios-thieuth */
+ 0, /* cho pieup-khieukh */
+ 0x11e5, /* cho pieup-hieuh -> jong pieup-hieuh */
+ 0, /* cho ssangsios-pieup */
+ 0, /* cho ieung-rieul */
+ 0, /* cho ieung-hieuh */
+ 0, /* cho ssangcieuc-hieuh */
+ 0, /* cho ssangthieuth */
+ 0, /* cho phieuph-hieuh */
+ 0, /* cho hieuh-sios */
+ 0, /* cho ssangyeorinhieuh */
+ };
+
+ if (c >= 0x1100 && c <= 0x115e)
+ return table[c - 0x1100];
+ else if (c >= 0xa960 && c <= 0xa97c)
+ return table_ext_a[c - 0xa960];
+
+ return 0;
}
ucschar
hangul_jongseong_to_choseong(ucschar c)
{
- static ucschar table[] = {
- 0x1100, /* jongseong kiyeok -> choseong kiyeok */
- 0x1101, /* jongseong ssangkiyeok -> choseong ssangkiyeok */
- 0x1109, /* jongseong kiyeok-sios -> choseong sios */
- 0x1102, /* jongseong nieun -> choseong nieun */
- 0x110c, /* jongseong nieun-cieuc -> choseong cieuc */
- 0x1112, /* jongseong nieun-hieuh -> choseong hieuh */
- 0x1103, /* jongseong tikeut -> choseong tikeut */
- 0x1105, /* jongseong rieul -> choseong rieul */
- 0x1100, /* jongseong rieul-kiyeok -> choseong kiyeok */
- 0x1106, /* jongseong rieul-mieum -> choseong mieum */
- 0x1107, /* jongseong rieul-pieup -> choseong pieup */
- 0x1109, /* jongseong rieul-sios -> choseong sios */
- 0x1110, /* jongseong rieul-thieuth -> choseong thieuth */
- 0x1111, /* jongseong rieul-phieuph -> choseong phieuph */
- 0x1112, /* jongseong rieul-hieuh -> choseong hieuh */
- 0x1106, /* jongseong mieum -> choseong mieum */
- 0x1107, /* jongseong pieup -> choseong pieup */
- 0x1109, /* jongseong pieup-sios -> choseong sios */
- 0x1109, /* jongseong sios -> choseong sios */
- 0x110a, /* jongseong ssangsios -> choseong ssangsios */
- 0x110b, /* jongseong ieung -> choseong ieung */
- 0x110c, /* jongseong cieuc -> choseong cieuc */
- 0x110e, /* jongseong chieuch -> choseong chieuch */
- 0x110f, /* jongseong khieukh -> choseong khieukh */
- 0x1110, /* jongseong thieuth -> choseong thieuth */
- 0x1111, /* jongseong phieuph -> choseong phieuph */
- 0x1112 /* jongseong hieuh -> choseong hieuh */
+ static const ucschar table[] = {
+ 0x1100, /* jong kiyeok -> cho kiyeok */
+ 0x1101, /* jong ssangkiyeok -> cho ssangkiyeok */
+ 0, /* jong kiyeok-sios */
+ 0x1102, /* jong nieun -> cho nieun */
+ 0x115c, /* jong nieun-cieuc -> cho nieun-cieuc */
+ 0x115d, /* jong nieun-hieuh -> cho nieun-hieuh */
+ 0x1103, /* jong tikeut -> cho tikeut */
+ 0x1105, /* jong rieul -> cho rieul */
+ 0xa964, /* jong rieul-kiyeok -> cho rieul-kiyeok */
+ 0xa968, /* jong rieul-mieum -> cho rieul-mieum */
+ 0xa969, /* jong rieul-pieup -> cho rieul-pieup */
+ 0xa96c, /* jong rieul-sios -> cho rieul-sios */
+ 0, /* jong rieul-thieuth */
+ 0, /* jong rieul-phieuph */
+ 0x111a, /* jong rieul-hieuh -> cho rieul-hieuh */
+ 0x1106, /* jong mieum -> cho mieum */
+ 0x1107, /* jong pieup -> cho pieup */
+ 0x1121, /* jong pieup-sios -> cho pieup-sios */
+ 0x1109, /* jong sios -> cho sios */
+ 0x110a, /* jong ssangsios -> cho ssangsios */
+ 0x110b, /* jong ieung -> cho ieung */
+ 0x110c, /* jong cieuc -> cho cieuc */
+ 0x110e, /* jong chieuch -> cho chieuch */
+ 0x110f, /* jong khieukh -> cho khieukh */
+ 0x1110, /* jong thieuth -> cho thieuth */
+ 0x1111, /* jong phieuph -> cho phieuph */
+ 0x1112, /* jong hieuh -> cho hieuh */
+ 0, /* jong kiyeok-rieul */
+ 0, /* jong kiyeok-sios-kiyeok */
+ 0x1113, /* jong nieun-kiyeok -> cho nieun-kiyeok */
+ 0x1115, /* jong nieun-tikeut -> cho nieun-tikeut */
+ 0x115b, /* jong nieun-sios -> cho nieun-sios */
+ 0, /* jong nieun-pansios */
+ 0, /* jong nieun-thieuth */
+ 0x1117, /* jong tikeut-kiyeok -> cho tikeut-kiyeok */
+ 0x115e, /* jong tikeut-rieul -> cho tikeut-rieul */
+ 0, /* jong rieul-kiyeok-sios */
+ 0x1118, /* jong rieul-nieun -> cho rieul-nieun */
+ 0xa966, /* jong rieul-tikeut -> cho rieul-tikeut */
+ 0, /* jong rieul-tikeut-hieuh */
+ 0x1119, /* jong ssangrieul -> cho ssangrieul */
+ 0, /* jong rieul-mieum-kiyeok */
+ 0, /* jong rieul-mieum-sios */
+ 0, /* jong rieul-pieup-sios */
+ 0, /* jong rieul-pieup-hieuh */
+ 0xa96b, /* jong rieul-kapyeounpieup -> cho rieul-kapyeounpieup */
+ 0, /* jong rieul-ssangsios */
+ 0, /* jong rieul-pansios */
+ 0xa96e, /* jong rieul-khieukh -> cho rieul-khieukh */
+ 0, /* jong rieul-yeorinhieuh */
+ 0xa96f, /* jong mieum-kiyeok -> cho mieum-kiyeok */
+ 0, /* jong mieum-rieul */
+ 0x111c, /* jong mieum-pieup -> cho mieum-pieup */
+ 0xa971, /* jong mieum-sios -> cho mieum-sios */
+ 0, /* jong mieum-ssangsios */
+ 0, /* jong mieum-pansios */
+ 0, /* jong mieum-chieuch */
+ 0, /* jong mieum-hieuh */
+ 0x111d, /* jong kapyeounmieum -> cho kapyeounmieum */
+ 0, /* jong pieup-rieul */
+ 0x112a, /* jong pieup-phieuph -> cho pieup-phieuph */
+ 0xa974, /* jong pieup-hieuh -> cho pieup-hieuh */
+ 0x112b, /* jong kapyeounpieup -> cho kapyeounpieup */
+ 0x112d, /* jong sios-kiyeok -> cho sios-kiyeok */
+ 0x112f, /* jong sios-tikeut -> cho sios-tikeut */
+ 0x1130, /* jong sios-rieul -> cho sios-rieul */
+ 0x1132, /* jong sios-pieup -> cho sios-pieup */
+ 0x1140, /* jong pansios -> cho pansios */
+ 0x1141, /* jong ieung-kiyeok -> cho ieung-kiyeok */
+ 0, /* jong ieung-ssangkiyeok */
+ 0x1147, /* jong ssangieung -> cho ssangieung */
+ 0, /* jong ieung-khieukh */
+ 0x114c, /* jong yesieung -> cho yesieung */
+ 0, /* jong yesieung-sios */
+ 0, /* jong yesieung-pansios */
+ 0x1156, /* jong phieuph-pieup -> cho phieuph-pieup */
+ 0x1157, /* jong kapyeounphieuph -> cho kapyeounphieuph */
+ 0, /* jong hieuh-nieun */
+ 0, /* jong hieuh-rieul */
+ 0, /* jong hieuh-mieum */
+ 0, /* jong hieuh-pieup */
+ 0x1159, /* jong yeorinhieuh -> cho yeorinhieuh */
+ 0, /* jong kiyeok-nieun */
+ 0, /* jong kiyeok-pieup */
+ 0, /* jong kiyeok-chieuch */
+ 0, /* jong kiyeok-khieukh */
+ 0, /* jong kiyeok-hieuh */
+ 0x1114, /* jong ssangnieun -> cho ssangnieun */
};
- if (c < 0x11a8 || c > 0x11c2)
- return 0;
- return table[c - 0x11a8];
+
+ static const ucschar table_ext_b[] = {
+ 0, /* jong nieun-rieul */
+ 0, /* jong nieun-chieuch */
+ 0x1104, /* jong ssangtikeut -> cho ssangtikeut */
+ 0, /* jong ssangtikeut-pieup */
+ 0xa961, /* jong tikeut-pieup -> cho tikeut-pieup */
+ 0xa962, /* jong tikeut-sios -> cho tikeut-sios */
+ 0, /* jong tikeut-sios-kiyeok */
+ 0xa963, /* jong tikeut-cieuc -> cho tikeut-cieuc */
+ 0, /* jong tikeut-chieuch */
+ 0, /* jong tikeut-thieuth */
+ 0xa965, /* jong rieul-ssangkiyeok -> cho rieul-ssangkiyeok */
+ 0, /* jong rieul-kiyeok-hieuh */
+ 0, /* jong ssangrieul-khieukh */
+ 0, /* jong rieul-mieum-hieuh */
+ 0, /* jong rieul-pieup-tikeut */
+ 0, /* jong rieul-pieup-phieuph */
+ 0, /* jong rieul-yesieung */
+ 0, /* jong rieul-yeorinhieuh-hieuh */
+ 0x111b, /* jong kapyeounrieul -> cho kapyeounrieul */
+ 0, /* jong mieum-nieun */
+ 0, /* jong mieum-ssangnieun */
+ 0, /* jong ssangmieum */
+ 0, /* jong mieum-pieup-sios */
+ 0, /* jong mieum-cieuc */
+ 0x1120, /* jong pieup-tikeut -> cho pieup-tikeut */
+ 0, /* jong pieup-rieul-phieuph */
+ 0, /* jong pieup-mieum */
+ 0x1108, /* jong ssangpieup -> cho ssangpieup */
+ 0x1123, /* jong pieup-sios-tikeut -> cho pieup-sios-tikeut */
+ 0x1127, /* jong pieup-cieuc -> cho pieup-cieuc */
+ 0x1128, /* jong pieup-chieuch -> cho pieup-chieuch */
+ 0x1131, /* jong sios-mieum -> cho sios-mieum */
+ 0, /* jong sios-kapyeounpieup */
+ 0, /* jong ssangsios-kiyeok */
+ 0, /* jong ssangsios-tikeut */
+ 0, /* jong sios-pansios */
+ 0x1136, /* jong sios-cieuc -> cho sios-cieuc */
+ 0x1137, /* jong sios-chieuch -> cho sios-chieuch */
+ 0x1139, /* jong sios-thieuth -> cho sios-thieuth */
+ 0x113b, /* jong sios-hieuh -> cho sios-hieuh */
+ 0, /* jong pansios-pieup */
+ 0, /* jong pansios-kapyeounpieup */
+ 0, /* jong yesieung-mieum */
+ 0, /* jong yesieung-hieuh */
+ 0, /* jong cieuc-pieup */
+ 0, /* jong cieuc-ssangpieup */
+ 0x110d, /* jong ssangcieuc -> cho ssangcieuc */
+ 0, /* jong phieuph-sios */
+ 0, /* jong phieuph-thieuth */
+ };
+
+ if (c >= 0x11a8 && c <= 0x11ff)
+ return table[c - 0x11a8];
+ else if (c >= 0xd7cb && c <= 0xd7fb)
+ return table_ext_b[c - 0xd7cb];
+
+ return 0;
}
void
@@ -702,6 +932,334 @@ hangul_jongseong_dicompose(ucschar c, ucschar* jong, ucschar* cho)
*cho = table[c - 0x11a8][1];
}
+static int
+hangul_jongseong_get_ncomponent(ucschar jong)
+{
+ static const char table[] = {
+ 1, /* kiyeok */
+ 2, /* ssangkiyeok */
+ 2, /* kiyeok-sios */
+ 1, /* nieun */
+ 2, /* nieun-cieuc */
+ 2, /* nieun-hieuh */
+ 1, /* tikeut */
+ 1, /* rieul */
+ 2, /* rieul-kiyeok */
+ 2, /* rieul-mieum */
+ 2, /* rieul-pieup */
+ 2, /* rieul-sios */
+ 2, /* rieul-thieuth */
+ 2, /* rieul-phieuph */
+ 2, /* rieul-hieuh */
+ 1, /* mieum */
+ 1, /* pieup */
+ 2, /* pieup-sios */
+ 1, /* sios */
+ 2, /* ssangsios */
+ 1, /* ieung */
+ 1, /* cieuc */
+ 1, /* chieuch */
+ 1, /* khieukh */
+ 1, /* thieuth */
+ 1, /* phieuph */
+ 1, /* hieuh */
+ 2, /* kiyeok-rieul */
+ 3, /* kiyeok-sios-kiyeok */
+ 2, /* nieun-kiyeok */
+ 2, /* nieun-tikeut */
+ 2, /* nieun-sios */
+ 2, /* nieun-pansios */
+ 2, /* nieun-thieuth */
+ 2, /* tikeut-kiyeok */
+ 2, /* tikeut-rieul */
+ 3, /* rieul-kiyeok-sios */
+ 2, /* rieul-nieun */
+ 2, /* rieul-tikeut */
+ 3, /* rieul-tikeut-hieuh */
+ 2, /* ssangrieul */
+ 3, /* rieul-mieum-kiyeok */
+ 3, /* rieul-mieum-sios */
+ 3, /* rieul-pieup-sios */
+ 3, /* rieul-pieup-hieuh */
+ 3, /* rieul-kapyeounpieup */
+ 3, /* rieul-ssangsios */
+ 2, /* rieul-pansios */
+ 2, /* rieul-khieukh */
+ 2, /* rieul-yeorinhieuh */
+ 2, /* mieum-kiyeok */
+ 2, /* mieum-rieul */
+ 2, /* mieum-pieup */
+ 2, /* mieum-sios */
+ 3, /* mieum-ssangsios */
+ 2, /* mieum-pansios */
+ 2, /* mieum-chieuch */
+ 2, /* mieum-hieuh */
+ 2, /* kapyeounmieum */
+ 2, /* pieup-rieul */
+ 2, /* pieup-phieuph */
+ 2, /* pieup-hieuh */
+ 2, /* kapyeounpieup */
+ 2, /* sios-kiyeok */
+ 2, /* sios-tikeut */
+ 2, /* sios-rieul */
+ 2, /* sios-pieup */
+ 1, /* pansios */
+ 2, /* ieung-kiyeok */
+ 3, /* ieung-ssangkiyeok */
+ 2, /* ssangieung */
+ 2, /* ieung-khieukh */
+ 1, /* yesieung */
+ 2, /* yesieung-sios */
+ 2, /* yesieung-pansios */
+ 2, /* phieuph-pieup */
+ 2, /* kapyeounphieuph */
+ 2, /* hieuh-nieun */
+ 2, /* hieuh-rieul */
+ 2, /* hieuh-mieum */
+ 2, /* hieuh-pieup */
+ 1, /* yeorinhieuh */
+ 2, /* kiyeok-nieun */
+ 2, /* kiyeok-pieup */
+ 2, /* kiyeok-chieuch */
+ 2, /* kiyeok-khieukh */
+ 2, /* kiyeok-hieuh */
+ 2, /* ssangnieun */
+ };
+
+ static const char table_ext_b[] = {
+ 2, /* nieun-rieul */
+ 2, /* nieun-chieuch */
+ 2, /* ssangtikeut */
+ 3, /* ssangtikeut-pieup */
+ 2, /* tikeut-pieup */
+ 2, /* tikeut-sios */
+ 3, /* tikeut-sios-kiyeok */
+ 2, /* tikeut-cieuc */
+ 2, /* tikeut-chieuch */
+ 2, /* tikeut-thieuth */
+ 3, /* rieul-ssangkiyeok */
+ 3, /* rieul-kiyeok-hieuh */
+ 3, /* ssangrieul-khieukh */
+ 3, /* rieul-mieum-hieuh */
+ 3, /* rieul-pieup-tikeut */
+ 3, /* rieul-pieup-phieuph */
+ 2, /* rieul-yesieung */
+ 3, /* rieul-yeorinhieuh-hieuh */
+ 2, /* kapyeounrieul */
+ 2, /* mieum-nieun */
+ 3, /* mieum-ssangnieun */
+ 2, /* ssangmieum */
+ 3, /* mieum-pieup-sios */
+ 2, /* mieum-cieuc */
+ 2, /* pieup-tikeut */
+ 3, /* pieup-rieul-phieuph */
+ 2, /* pieup-mieum */
+ 2, /* ssangpieup */
+ 3, /* pieup-sios-tikeut */
+ 2, /* pieup-cieuc */
+ 2, /* pieup-chieuch */
+ 2, /* sios-mieum */
+ 3, /* sios-kapyeounpieup */
+ 3, /* ssangsios-kiyeok */
+ 3, /* ssangsios-tikeut */
+ 2, /* sios-pansios */
+ 2, /* sios-cieuc */
+ 2, /* sios-chieuch */
+ 2, /* sios-thieuth */
+ 2, /* sios-hieuh */
+ 2, /* pansios-pieup */
+ 3, /* pansios-kapyeounpieup */
+ 2, /* yesieung-mieum */
+ 2, /* yesieung-hieuh */
+ 2, /* cieuc-pieup */
+ 3, /* cieuc-ssangpieup */
+ 2, /* ssangcieuc */
+ 2, /* phieuph-sios */
+ 2, /* phieuph-thieuth */
+ };
+
+ if (jong >= 0x11a8 && jong <= 0x11ff) {
+ return table[jong - 0x11a8];
+ } else if (jong >= 0xd7cb && jong <= 0xd7fb) {
+ return table_ext_b[jong - 0xd7cb];
+ }
+
+ return 0;
+}
+
+ucschar
+hangul_jongseong_get_diff(ucschar prevjong, ucschar jong)
+{
+ static const ucschar table[][2] = {
+ { 0x1100, 0x1100 }, /* kiyeok: kiyeok, kiyeok */
+ { 0x1100, 0x1101 }, /* ssangkiyeok: kiyeok, ssangkiyeok */
+ { 0x1109, 0 }, /* kiyeok-sios: sios */
+ { 0x1102, 0x1102 }, /* nieun: nieun, nieun */
+ { 0x110c, 0x115c }, /* nieun-cieuc: cieuc, nieun-cieuc */
+ { 0x1112, 0x115d }, /* nieun-hieuh: hieuh, nieun-hieuh */
+ { 0x1103, 0x1103 }, /* tikeut: tikeut, tikeut */
+ { 0x1105, 0x1105 }, /* rieul: rieul, rieul */
+ { 0x1100, 0xa964 }, /* rieul-kiyeok: kiyeok, rieul-kiyeok */
+ { 0x1106, 0xa968 }, /* rieul-mieum: mieum, rieul-mieum */
+ { 0x1107, 0xa969 }, /* rieul-pieup: pieup, rieul-pieup */
+ { 0x1109, 0xa96c }, /* rieul-sios: sios, rieul-sios */
+ { 0x1110, 0 }, /* rieul-thieuth: thieuth */
+ { 0x1111, 0 }, /* rieul-phieuph: phieuph */
+ { 0x1112, 0x111a }, /* rieul-hieuh: hieuh, rieul-hieuh */
+ { 0x1106, 0x1106 }, /* mieum: mieum, mieum */
+ { 0x1107, 0x1107 }, /* pieup: pieup, pieup */
+ { 0x1109, 0x1121 }, /* pieup-sios: sios, pieup-sios */
+ { 0x1109, 0x1109 }, /* sios: sios, sios */
+ { 0x1109, 0x110a }, /* ssangsios: sios, ssangsios */
+ { 0x110b, 0x110b }, /* ieung: ieung, ieung */
+ { 0x110c, 0x110c }, /* cieuc: cieuc, cieuc */
+ { 0x110e, 0x110e }, /* chieuch: chieuch, chieuch */
+ { 0x110f, 0x110f }, /* khieukh: khieukh, khieukh */
+ { 0x1110, 0x1110 }, /* thieuth: thieuth, thieuth */
+ { 0x1111, 0x1111 }, /* phieuph: phieuph, phieuph */
+ { 0x1112, 0x1112 }, /* hieuh: hieuh, hieuh */
+ { 0x1105, 0 }, /* kiyeok-rieul: rieul */
+ { 0x1100, 0x112d }, /* kiyeok-sios-kiyeok: kiyeok, sios-kiyeok */
+ { 0x1100, 0x1113 }, /* nieun-kiyeok: kiyeok, nieun-kiyeok */
+ { 0x1103, 0x1115 }, /* nieun-tikeut: tikeut, nieun-tikeut */
+ { 0x1109, 0x115b }, /* nieun-sios: sios, nieun-sios */
+ { 0x1140, 0 }, /* nieun-pansios: pansios */
+ { 0x1110, 0 }, /* nieun-thieuth: thieuth */
+ { 0x1100, 0x1117 }, /* tikeut-kiyeok: kiyeok, tikeut-kiyeok */
+ { 0x1105, 0x115e }, /* tikeut-rieul: rieul, tikeut-rieul */
+ { 0x1109, 0 }, /* rieul-kiyeok-sios: sios */
+ { 0x1102, 0x1118 }, /* rieul-nieun: nieun, rieul-nieun */
+ { 0x1103, 0xa966 }, /* rieul-tikeut: tikeut, rieul-tikeut */
+ { 0x1112, 0 }, /* rieul-tikeut-hieuh: hieuh */
+ { 0x1105, 0x1119 }, /* ssangrieul: rieul, ssangrieul */
+ { 0x1100, 0xa96f }, /* rieul-mieum-kiyeok: kiyeok, mieum-kiyeok */
+ { 0x1109, 0xa971 }, /* rieul-mieum-sios: sios, mieum-sios */
+ { 0x1109, 0x1121 }, /* rieul-pieup-sios: sios, pieup-sios */
+ { 0x1112, 0xa974 }, /* rieul-pieup-hieuh: hieuh, pieup-hieuh */
+ { 0x110b, 0x112b }, /* rieul-kapyeounpieup: ieung, kapyeounpieup */
+ { 0x1109, 0x110a }, /* rieul-ssangsios: sios, ssangsios */
+ { 0x1140, 0 }, /* rieul-pansios: pansios */
+ { 0x110f, 0xa96e }, /* rieul-khieukh: khieukh, rieul-khieukh */
+ { 0x1159, 0 }, /* rieul-yeorinhieuh: yeorinhieuh */
+ { 0x1100, 0xa96f }, /* mieum-kiyeok: kiyeok, mieum-kiyeok */
+ { 0x1105, 0 }, /* mieum-rieul: rieul */
+ { 0x1107, 0x111c }, /* mieum-pieup: pieup, mieum-pieup */
+ { 0x1109, 0xa971 }, /* mieum-sios: sios, mieum-sios */
+ { 0x1109, 0x110a }, /* mieum-ssangsios: sios, ssangsios */
+ { 0x1140, 0 }, /* mieum-pansios: pansios */
+ { 0x110e, 0 }, /* mieum-chieuch: chieuch */
+ { 0x1112, 0 }, /* mieum-hieuh: hieuh */
+ { 0x110b, 0x111d }, /* kapyeounmieum: ieung, kapyeounmieum */
+ { 0x1105, 0 }, /* pieup-rieul: rieul */
+ { 0x1111, 0x112a }, /* pieup-phieuph: phieuph, pieup-phieuph */
+ { 0x1112, 0xa974 }, /* pieup-hieuh: hieuh, pieup-hieuh */
+ { 0x110b, 0x112b }, /* kapyeounpieup: ieung, kapyeounpieup */
+ { 0x1100, 0x112d }, /* sios-kiyeok: kiyeok, sios-kiyeok */
+ { 0x1103, 0x112f }, /* sios-tikeut: tikeut, sios-tikeut */
+ { 0x1105, 0x1130 }, /* sios-rieul: rieul, sios-rieul */
+ { 0x1107, 0x1132 }, /* sios-pieup: pieup, sios-pieup */
+ { 0x1140, 0x1140 }, /* pansios: pansios, pansios */
+ { 0x1100, 0x1141 }, /* ieung-kiyeok: kiyeok, ieung-kiyeok */
+ { 0x1100, 0x1101 }, /* ieung-ssangkiyeok: kiyeok, ssangkiyeok */
+ { 0x110b, 0x1147 }, /* ssangieung: ieung, ssangieung */
+ { 0x110f, 0 }, /* ieung-khieukh: khieukh */
+ { 0x114c, 0x114c }, /* yesieung: yesieung, yesieung */
+ { 0x1109, 0 }, /* yesieung-sios: sios */
+ { 0x1140, 0 }, /* yesieung-pansios: pansios */
+ { 0x1107, 0x1156 }, /* phieuph-pieup: pieup, phieuph-pieup */
+ { 0x110b, 0x1157 }, /* kapyeounphieuph: ieung, kapyeounphieuph */
+ { 0x1102, 0 }, /* hieuh-nieun: nieun */
+ { 0x1105, 0 }, /* hieuh-rieul: rieul */
+ { 0x1106, 0 }, /* hieuh-mieum: mieum */
+ { 0x1107, 0 }, /* hieuh-pieup: pieup */
+ { 0x1159, 0x1159 }, /* yeorinhieuh: yeorinhieuh, yeorinhieuh */
+ { 0x1102, 0 }, /* kiyeok-nieun: nieun */
+ { 0x1107, 0 }, /* kiyeok-pieup: pieup */
+ { 0x110e, 0 }, /* kiyeok-chieuch: chieuch */
+ { 0x110f, 0 }, /* kiyeok-khieukh: khieukh */
+ { 0x1112, 0 }, /* kiyeok-hieuh: hieuh */
+ { 0x1102, 0x1114 }, /* ssangnieun: nieun, ssangnieun */
+ };
+
+ static const ucschar table_ext_b[][2] = {
+ { 0x1105, 0 }, /* nieun-rieul: rieul */
+ { 0x110e, 0 }, /* nieun-chieuch: chieuch */
+ { 0x1103, 0x1104 }, /* ssangtikeut: tikeut, ssangtikeut */
+ { 0x1107, 0xa961 }, /* ssangtikeut-pieup: pieup, tikeut-pieup */
+ { 0x1107, 0xa961 }, /* tikeut-pieup: pieup, tikeut-pieup */
+ { 0x1109, 0xa962 }, /* tikeut-sios: sios, tikeut-sios */
+ { 0x1100, 0x112d }, /* tikeut-sios-kiyeok: kiyeok, sios-kiyeok */
+ { 0x110c, 0xa963 }, /* tikeut-cieuc: cieuc, tikeut-cieuc */
+ { 0x110e, 0 }, /* tikeut-chieuch: chieuch */
+ { 0x1110, 0 }, /* tikeut-thieuth: thieuth */
+ { 0x1100, 0x1101 }, /* rieul-ssangkiyeok: kiyeok, ssangkiyeok */
+ { 0x1112, 0 }, /* rieul-kiyeok-hieuh: hieuh */
+ { 0x110f, 0xa96e }, /* ssangrieul-khieukh: khieukh, rieul-khieukh */
+ { 0x1112, 0 }, /* rieul-mieum-hieuh: hieuh */
+ { 0x1103, 0x1120 }, /* rieul-pieup-tikeut: tikeut, pieup-tikeut */
+ { 0x1111, 0x112a }, /* rieul-pieup-phieuph: phieuph, pieup-phieuph */
+ { 0x114c, 0 }, /* rieul-yesieung: yesieung */
+ { 0x1112, 0 }, /* rieul-yeorinhieuh-hieuh: hieuh */
+ { 0x110b, 0x111b }, /* kapyeounrieul: ieung, kapyeounrieul */
+ { 0x1102, 0 }, /* mieum-nieun: nieun */
+ { 0x1102, 0x1114 }, /* mieum-ssangnieun: nieun, ssangnieun */
+ { 0x1106, 0 }, /* ssangmieum: mieum */
+ { 0x1109, 0x1121 }, /* mieum-pieup-sios: sios, pieup-sios */
+ { 0x110c, 0 }, /* mieum-cieuc: cieuc */
+ { 0x1103, 0x1120 }, /* pieup-tikeut: tikeut, pieup-tikeut */
+ { 0x1111, 0 }, /* pieup-rieul-phieuph: phieuph */
+ { 0x1106, 0 }, /* pieup-mieum: mieum */
+ { 0x1107, 0x1108 }, /* ssangpieup: pieup, ssangpieup */
+ { 0x1103, 0x112f }, /* pieup-sios-tikeut: tikeut, sios-tikeut */
+ { 0x110c, 0x1127 }, /* pieup-cieuc: cieuc, pieup-cieuc */
+ { 0x110e, 0x1128 }, /* pieup-chieuch: chieuch, pieup-chieuch */
+ { 0x1106, 0x1131 }, /* sios-mieum: mieum, sios-mieum */
+ { 0x110b, 0x112b }, /* sios-kapyeounpieup: ieung, kapyeounpieup */
+ { 0x1100, 0x112d }, /* ssangsios-kiyeok: kiyeok, sios-kiyeok */
+ { 0x1103, 0x112f }, /* ssangsios-tikeut: tikeut, sios-tikeut */
+ { 0x1140, 0 }, /* sios-pansios: pansios */
+ { 0x110c, 0x1136 }, /* sios-cieuc: cieuc, sios-cieuc */
+ { 0x110e, 0x1137 }, /* sios-chieuch: chieuch, sios-chieuch */
+ { 0x1110, 0x1139 }, /* sios-thieuth: thieuth, sios-thieuth */
+ { 0x1112, 0x113b }, /* sios-hieuh: hieuh, sios-hieuh */
+ { 0x1107, 0 }, /* pansios-pieup: pieup */
+ { 0x110b, 0x112b }, /* pansios-kapyeounpieup: ieung, kapyeounpieup */
+ { 0x1106, 0 }, /* yesieung-mieum: mieum */
+ { 0x1112, 0 }, /* yesieung-hieuh: hieuh */
+ { 0x1107, 0 }, /* cieuc-pieup: pieup */
+ { 0x1107, 0x1108 }, /* cieuc-ssangpieup: pieup, ssangpieup */
+ { 0x110c, 0x110d }, /* ssangcieuc: cieuc, ssangcieuc */
+ { 0x1109, 0 }, /* phieuph-sios: sios */
+ { 0x1110, 0 }, /* phieuph-thieuth: thieuth */
+ };
+
+ ucschar cho = 0;
+
+ if (prevjong == 0) {
+ cho = hangul_jongseong_to_choseong(jong);
+ } else {
+ int diff;
+ int n1;
+ int n2;
+
+ n1 = hangul_jongseong_get_ncomponent(prevjong);
+ n2 = hangul_jongseong_get_ncomponent(jong);
+
+ diff = n2 - n1 - 1;
+ if (diff >= 0 && diff < 2) {
+ if (jong >= 0x11a8 && jong <= 0x11ff) {
+ cho = table[jong - 0x11a8][diff];
+ } else if (jong >= 0xd7cb && jong <= 0xd7fb) {
+ cho = table_ext_b[jong - 0xd7cb][diff];
+ }
+ } else if (diff == 2) {
+ cho = hangul_jongseong_to_choseong(jong);
+ }
+ }
+
+ return cho;
+}
+
/**
* @ingroup hangulctype
* @brief 자모 코드를 조합하여 한글 음절로 변환
diff --git a/hangul/hangulinputcontext.c b/hangul/hangulinputcontext.c
index a34646d..953240f 100644
--- a/hangul/hangulinputcontext.c
+++ b/hangul/hangulinputcontext.c
@@ -269,6 +269,14 @@ static const HangulKeyboard hangul_keyboard_2 = {
&hangul_combination_default
};
+static const HangulKeyboard hangul_keyboard_2y = {
+ HANGUL_KEYBOARD_TYPE_JAMO,
+ "2y",
+ N_("Dubeolsik yetgeul"),
+ (ucschar*)hangul_keyboard_table_2y,
+ &hangul_combination_full
+};
+
static const HangulKeyboard hangul_keyboard_32 = {
HANGUL_KEYBOARD_TYPE_JASO,
"32",
@@ -327,6 +335,7 @@ static const HangulKeyboard hangul_keyboard_ahn = {
static const HangulKeyboard* hangul_keyboards[] = {
&hangul_keyboard_2,
+ &hangul_keyboard_2y,
&hangul_keyboard_32,
&hangul_keyboard_390,
&hangul_keyboard_3final,
@@ -853,20 +862,26 @@ hangul_ic_process_jamo(HangulInputContext *hic, ucschar ch)
pop = hangul_ic_pop(hic);
peek = hangul_ic_peek(hic);
- if (hangul_is_jungseong(peek)) {
- hic->buffer.jongseong = 0;
- hangul_ic_save_commit_string(hic);
- hangul_ic_push(hic, hangul_jongseong_to_choseong(pop));
- if (!hangul_ic_push(hic, ch)) {
- return false;
+ if (hangul_is_jongseong(peek)) {
+ ucschar choseong = hangul_jongseong_get_diff(peek,
+ hic->buffer.jongseong);
+ if (choseong == 0) {
+ hangul_ic_save_commit_string(hic);
+ if (!hangul_ic_push(hic, ch)) {
+ return false;
+ }
+ } else {
+ hic->buffer.jongseong = peek;
+ hangul_ic_save_commit_string(hic);
+ hangul_ic_push(hic, choseong);
+ if (!hangul_ic_push(hic, ch)) {
+ return false;
+ }
}
} else {
- ucschar choseong = 0, jongseong = 0;
- hangul_jongseong_dicompose(hic->buffer.jongseong,
- &jongseong, &choseong);
- hic->buffer.jongseong = jongseong;
+ hic->buffer.jongseong = 0;
hangul_ic_save_commit_string(hic);
- hangul_ic_push(hic, choseong);
+ hangul_ic_push(hic, hangul_jongseong_to_choseong(pop));
if (!hangul_ic_push(hic, ch)) {
return false;
}
diff --git a/hangul/hangulinternals.h b/hangul/hangulinternals.h
index cd243a4..8475bcd 100644
--- a/hangul/hangulinternals.h
+++ b/hangul/hangulinternals.h
@@ -3,4 +3,6 @@
#define N_ELEMENTS(array) (sizeof (array) / sizeof ((array)[0]))
+ucschar hangul_jongseong_get_diff(ucschar prevjong, ucschar jong);
+
#endif /* libhangul_hangulinternals_h */
diff --git a/hangul/hangulkeyboard.h b/hangul/hangulkeyboard.h
index 08db9c2..66c888e 100644
--- a/hangul/hangulkeyboard.h
+++ b/hangul/hangulkeyboard.h
@@ -129,6 +129,137 @@ static const ucschar hangul_keyboard_table_2[] = {
0x0000 /* 0x7F delete */
};
+static const ucschar hangul_keyboard_table_2y[] = {
+ 0x0000, /* 0x00 null */
+ 0x0000, /* 0x01 start of heading */
+ 0x0000, /* 0x02 start of text */
+ 0x0000, /* 0x03 end of text */
+ 0x0000, /* 0x04 end of transmission */
+ 0x0000, /* 0x05 enquiry */
+ 0x0000, /* 0x06 acknowledge */
+ 0x0000, /* 0x07 bell */
+ 0x0000, /* 0x08 backspace */
+ 0x0000, /* 0x09 character tabulation */
+ 0x0000, /* 0x0A line feed (lf) */
+ 0x0000, /* 0x0B line tabulation */
+ 0x0000, /* 0x0C form feed (ff) */
+ 0x0000, /* 0x0D carriage return (cr) */
+ 0x0000, /* 0x0E shift out */
+ 0x0000, /* 0x0F shift in */
+ 0x0000, /* 0x10 data link escape */
+ 0x0000, /* 0x11 device control one */
+ 0x0000, /* 0x12 device control two */
+ 0x0000, /* 0x13 device control three */
+ 0x0000, /* 0x14 device control four */
+ 0x0000, /* 0x15 negative acknowledge */
+ 0x0000, /* 0x16 synchronous idle */
+ 0x0000, /* 0x17 end of transmission block */
+ 0x0000, /* 0x18 cancel */
+ 0x0000, /* 0x19 end of medium */
+ 0x0000, /* 0x1A substitute */
+ 0x0000, /* 0x1B escape */
+ 0x0000, /* 0x1C information separator four */
+ 0x0000, /* 0x1D information separator three */
+ 0x0000, /* 0x1E information separator two */
+ 0x0000, /* 0x1F information separator one */
+ 0x0000, /* 0x20 space */
+ 0x0021, /* 0x21 exclam: exclamation mark */
+ 0x0022, /* 0x22 quotedbl: quotation mark */
+ 0x0023, /* 0x23 numbersign: number sign */
+ 0x0024, /* 0x24 dollar: dollar sign */
+ 0x0025, /* 0x25 percent: percent sign */
+ 0x0026, /* 0x26 ampersand: ampersand */
+ 0x0027, /* 0x27 apostrophe: apostrophe */
+ 0x0028, /* 0x28 parenleft: left parenthesis */
+ 0x0029, /* 0x29 parenright: right parenthesis */
+ 0x002a, /* 0x2A asterisk: asterisk */
+ 0x002b, /* 0x2B plus: plus sign */
+ 0x002c, /* 0x2C comma: comma */
+ 0x002d, /* 0x2D minus: minus sign */
+ 0x002e, /* 0x2E period: period */
+ 0x002f, /* 0x2F slash: slash */
+ 0x0030, /* 0x30 0: 0 */
+ 0x0031, /* 0x31 1: 1 */
+ 0x0032, /* 0x32 2: 2 */
+ 0x0033, /* 0x33 3: 3 */
+ 0x0034, /* 0x34 4: 4 */
+ 0x0035, /* 0x35 5: 5 */
+ 0x0036, /* 0x36 6: 6 */
+ 0x0037, /* 0x37 7: 7 */
+ 0x0038, /* 0x38 8: 8 */
+ 0x0039, /* 0x39 9: 9 */
+ 0x003a, /* 0x3A colon: colon */
+ 0x003b, /* 0x3B semicolon: semicolon */
+ 0x003c, /* 0x3C less: less-than sign */
+ 0x003d, /* 0x3D equal: equals sign */
+ 0x003e, /* 0x3E greater: greater-than sign */
+ 0x003f, /* 0x3F question: question mark */
+ 0x0040, /* 0x40 at: commercial at */
+ 0x1140, /* 0x41 A: choseong pansios */
+ 0x1154, /* 0x42 B: choseong chitueumchieuch */
+ 0x114e, /* 0x43 C: choseong chitueumcieuc */
+ 0x114c, /* 0x44 D: choseong yesieung */
+ 0x1104, /* 0x45 E: choseong ssangtikeut */
+ 0x111a, /* 0x46 F: choseong rieul-hieuh */
+ 0x1159, /* 0x47 G: choseong yeorinhieuh */
+ 0x1183, /* 0x48 H: jungseong o-u */
+ 0x1163, /* 0x49 I: jungseong ya */
+ 0x1165, /* 0x4A J: jungseong eo */
+ 0x119e, /* 0x4B K: jungseong araea */
+ 0x1194, /* 0x4C L: jungseong yu-i */
+ 0x1173, /* 0x4D M: jungseong eu */
+ 0x1155, /* 0x4E N: choseong ceongchieumchieuch */
+ 0x1164, /* 0x4F O: jungseong yae */
+ 0x1168, /* 0x50 P: jungseong ye */
+ 0x1108, /* 0x51 Q: choseong ssangpieup */
+ 0x1101, /* 0x52 R: choseong ssangkiyeok */
+ 0x115d, /* 0x53 S: choseong nieun-hieuh */
+ 0x110a, /* 0x54 T: choseong ssangsios */
+ 0x1167, /* 0x55 U: jungseong yeo */
+ 0x1150, /* 0x56 V: choseong ceongchieumcieuc */
+ 0x110d, /* 0x57 W: choseong ssangcieuc */
+ 0x113e, /* 0x58 X: choseong ceongchieumsios */
+ 0x116d, /* 0x59 Y: jungseong yo */
+ 0x113c, /* 0x5A Z: choseong chitueumsios */
+ 0x005b, /* 0x5B bracketleft: left bracket */
+ 0x005c, /* 0x5C backslash: backslash */
+ 0x005d, /* 0x5D bracketright: right bracket */
+ 0x005e, /* 0x5E asciicircum: circumflex accent */
+ 0x005f, /* 0x5F underscore: underscore */
+ 0x0060, /* 0x60 quoteleft: grave accent */
+ 0x1106, /* 0x61 a: choseong mieum */
+ 0x1172, /* 0x62 b: jungseong yu */
+ 0x110e, /* 0x63 c: choseong chieuch */
+ 0x110b, /* 0x64 d: choseong ieung */
+ 0x1103, /* 0x65 e: choseong tikeut */
+ 0x1105, /* 0x66 f: choseong rieul */
+ 0x1112, /* 0x67 g: choseong hieuh */
+ 0x1169, /* 0x68 h: jungseong o */
+ 0x1163, /* 0x69 i: jungseong ya */
+ 0x1165, /* 0x6A j: jungseong eo */
+ 0x1161, /* 0x6B k: jungseong a */
+ 0x1175, /* 0x6C l: jungseong i */
+ 0x1173, /* 0x6D m: jungseong eu */
+ 0x116e, /* 0x6E n: jungseong u */
+ 0x1162, /* 0x6F o: jungseong ae */
+ 0x1166, /* 0x70 p: jungseong e */
+ 0x1107, /* 0x71 q: choseong pieup */
+ 0x1100, /* 0x72 r: choseong kiyeok */
+ 0x1102, /* 0x73 s: choseong nieun */
+ 0x1109, /* 0x74 t: choseong sios */
+ 0x1167, /* 0x75 u: jungseong yeo */
+ 0x1111, /* 0x76 v: choseong phieuph */
+ 0x110c, /* 0x77 w: choseong cieuc */
+ 0x1110, /* 0x78 x: choseong thieuth */
+ 0x116d, /* 0x79 y: jungseong yo */
+ 0x110f, /* 0x7A z: choseong khieukh */
+ 0x007b, /* 0x7B braceleft: left brace */
+ 0x007c, /* 0x7C bar: vertical bar */
+ 0x007d, /* 0x7D braceright: right brace */
+ 0x007e, /* 0x7E asciitilde: tilde */
+ 0x0000 /* 0x7F delete */
+};
+
static const ucschar hangul_keyboard_table_32[] = {
0x0000, /* 0x00 null */
0x0000, /* 0x01 start of heading */