On Mon, 14 Oct 2002, Pablo Saratxaga wrote:

Thank you for your reply.

> On Mon, Oct 14, 2002 at 10:00:34AM -0400, Jungshik Shin wrote:
>
> > I've been trying to come up with Xkb and Compose  for Korean Hangul.
> > I activated the attached Xkb file(made by PARK Won-kyu) with 'xkbcomp
>
> > <Multi_key> <U1106> <U110b> : "???" U111d

> Does your keyboard send unicode char U+1107 or an X11 specific keysym ?
....
> Apparently, the keyboard is sending korean keysyms, and not unicode chars

  That was the cause. Xkb I was using (I forgot to attach to
my last message) produces X11 specific keysym.


> If you look at /usr/include/X11/keysymdef.h you will see that
> "Hangul_Pieub" is equal to keysym 0xeb2, that is different of "U1107"
> which is keysym 0x1001107

  Yup.

> Now, if you think that some/all of the Hangul X11 keysyms should be merged
> with unicode keysyms equivalents, in order to have the same behaviour using
> one or the other way, then it can probably be done, but apparentyl it hasn't
> yet.

  I guess it'll take a very long time to propagate all those changes
across platforms and the world. A much easier way is to NEVER use Hangul
X11 (symbolic) keysyms and to just use <U0uuuu> for Compose and 0x100uuuu
for Xkb.  This is exactly the same reason as adding  new  X11 symbolic
keysyms is not desirable.


> > Does <Uxxxx> or
> > <U0xxxx> work? My Linux box is running XFree86 4.2.0 (from
> > RedHat 8.0).
>
> It works, but the keyboard has to send that.

  Now it works great.  Attached are  a new Xkb I've just made
(with 0x100uuuu keysyms) and PARK Won-kyu's Xkb (based on a traditional
3-set KBD). The keyboard layout of the former is based on 2-set Korean
keyboard with 6 additional letters (3 obsolete Korean consonants, 1
obsolete Korean vowel, and two Korean tone marks) and 5 germinates (that
can be entered by two successive basic consonants) removed.  However,
it's actually a 3-set keyboard because trailing consonants are assigned
shifted-position.  That is, unlike 2-set KBD, no automata is necessary
to distinguish between leading consonants and trailing consonants.

  When I decided to make this, the motivation was to enter
old Korean text with more ease than I could with Vim/Yudit's Romanization
based keymaps. (http://jshin.net/i18n/korean/mid_kor.vim). Having used
Romanization-based-keymaps for pre-1933 orthography Korean text input,
now I'm finding myself confused by what's supposed to be more
convenient. :-)

> > BTW, I also found that Compose file is not refered to when XIM is used.
> > That is, under ko_KR.UTF-8 where Ami is running as an XIM server,
> > Compose file has no effect although Xkb works well together with XIM
> > server.  Is it intended or just a bug?
>
> The Compose file works as an XIM method (it is just an easy to use,
> and enabled by default one); and currently XFree86 is limited to only
> one XIM at a time, so you cannot have both Compose and Ami (or any other
> XIM).

  After sending out my message, I realized that and felt stupid
for asking the obvious. Anyway, as we discussed before, multiple input
methods(including Compose - the simplest XIM ) running 'simultaneously'
(activated one at a time but switchable) are certainly in great need. BTW,
gtk2 appears to sorta have it. If I right-click on text-input widget
of Gtk2 application, the context-menu pops up with the list of input
modules including XIM (of the current locale) and gtk-built-in input
modules. In my installation, there are about 8 or 9 of them. I've also
installed 'imhangul' module by CHOI Hwan-jin (http://imhangul.kldp.net)
and it works very well.

  Incidentally, I'm wondering whether Qt3 can have a similar mechanism.

  Thanks again for your answer.

  Jungshik

// A variant of Korean 2-set KBD by Jungshik Shin
// 
//  - Only basic Jamos are assigned key positions.
//  - Trailing consonants are to be entered by shifting. Therefore,
//    it's actually a 3-set KBD.
//  - Three obsolete consonants and one obsolete vowel are assigned
//  - Two Hangul tone marks are assigned. 

// xkbcomp -R/usr/X11R6/lib/X11/xkb/     /full/path/kor2v.xkb  :0
xkb_keymap "korea_2kb_variant" {
    xkb_keycodes        { include "xfree86"             };
    xkb_types           { include "default"             };
    xkb_compatibility   { include "default"             };
    xkb_geometry        { include "pc(pc105)"           };

xkb_symbols  {

    include "en_US(pc105)+group(toggle)"

    name[Group1]= "US/ASCII";
    name[Group2]= "Korean";
    key <AB01> {        [       z,      Z       ],
                        [               0x100110F, 0x10011BF    ]       };
    key <AC01> {        [       a,      A       ],
                        [       0x1001106, 0x10011B7]   };
    key <AD01> {        [       q,      Q       ],
                        [       0x1001107,      0x10011B8       ]       };
    key <AB02> {        [       x,      X       ],
                        [       0x1001110,      0x10011C0       ]       };
    key <AC02> {        [       s,      S       ],
                        [       0x1001102,      0x10011AB       ]       };
    key <AD02> {        [       w,      W       ],
                        [       0x100110C,      0x10011BD       ]       };
    key <AE02> {        [       2,      at      ],
                        [       0x100114C, 0x10011F0]   };
    key <AB03> {        [       c,      C       ],
                        [0x100110E,     0x10011BE       ]       };
    key <AC03> {        [       d,      D       ],
                        [       0x100110B,      0x10011BC       ]       };
    key <AD03> {        [       e,      E       ],
                        [       0x1001103, 0x10011AE    ]       };
    key <AB04> {        [       v,      V       ],
                        [       0x1001111,      0x10011C1       ]       };
    key <AC04> {        [       f,      F       ],
                        [       0x1001105,      0x10011AF       ]       };
    key <AD04> {        [       r,      R       ],
                        [       0x1001100,      0x10011A8       ]       };
    key <AE04> {        [       4,      dollar  ],
                        [       0x1001159,      0x10011F9       ]       };
    key <AB05> {        [       b,      B       ],
                        [       0x1001172, 0x1001172]   };
    key <AC05> {        [       g,      G       ],
                        [       0x1001112, 0x10011C2]   };
    key <AD05> {        [       t,      T       ],
                        [       0x1001109,      0x10011BA       ]       };
    key <AB06> {        [       n,      N       ],
                        [       0x100116E,      0x100116E       ]       };
    key <AC06> {        [       h,      H       ],
                        [       0x1001169, 0x1001169    ]       };
    key <AD06> {        [       y,      Y       ],
                        [ 0x100116D,     0x100116D      ]       };
    key <AE06> {        [       6,      asciicircum     ],
                        [       0x1001140, 0x10011EB    ]       };
    key <AB07> {        [       m,      M       ],
                        [       0x1001173,      0x1001173       ]       };
    key <AC07> {        [       j,      J       ],
                        [       0x1001165,      0x1001165       ]       };
    key <AD07> {        [       u,      U       ],
                        [       0x1001167,      0x1001167       ]       };
    key <AC08> {        [       k,      K       ],
                        [       0x1001161,0x100119E]    };
    key <AD08> {        [       i,      I       ],
                        [0x1001163,0x1001163    ]       };
    key <AC09> {        [       l,      L       ],
                        [       0x1001175,      0x1001175       ]       };
    key <AD09> {        [       o,      O       ],
                        [       0x1001162,      0x1001164       ]       };
    key <AC10> {        [       semicolon,      colon   ],
     [ 0x100302e, 0x100302f  ] };
    key <AD10> {        [       p,      P       ],
                        [       0x1001166,      0x1001168       ]       };
    key <AE10> {        [       0,      parenright      ],
                        [       0x100115f,      0x1001160       ]       };
    // End alphanumeric section

    // Begin modifier mappings

//    modifier_map Shift  { Shift_L };
//    modifier_map Lock   { Caps_Lock, ISO_Lock };
//    modifier_map Control{ Control_L };
//    modifier_map Mod3   { Mode_switch };
};
};
// xkbcomp -R/usr/X11R6/lib/X11/xkb/     3fin.xkb  :0
xkb_keymap "korea3fin" {
    xkb_keycodes        { include "xfree86"             };
    xkb_types           { include "default"             };
    xkb_compatibility   { include "default"             };
    xkb_geometry        { include "pc(pc102)"           };

xkb_symbols  {

    include "en_US(pc105)+group(toggle)"

    name[Group1]= "US/ASCII";
    name[Group2]= "Korean";
    key <TLDE> {        [       grave,  asciitilde      ],
                        [       asterisk,       hexagram        ]       };
    key <AB01> {        [       z,      Z       ],
                        [       Hangul_J_Mieum, Hangul_J_Cieuc  ]       };
    key <AC01> {        [       a,      A       ],
                        [       Hangul_J_Ieung, Hangul_J_Dikeud ]       };
    key <AD01> {        [       q,      Q       ],
                        [       Hangul_J_Sios,  Hangul_J_Pieub  ]       };
    key <AE01> {        [       1,      exclam  ],
                        [       Hangul_J_Hieuh, Hangul_J_SsangKiyeog    ]       };
    key <AB02> {        [       x,      X       ],
                        [       Hangul_J_Kiyeog,        Hangul_J_PieubSios      ]      
 };
    key <AC02> {        [       s,      S       ],
                        [       Hangul_J_Nieun, Hangul_J_NieunHieuh     ]       };
    key <AD02> {        [       w,      W       ],
                        [       Hangul_J_Rieul, Hangul_J_Tieut  ]       };
    key <AE02> {        [       2,      at      ],
                        [       Hangul_J_SsangSios,     Hangul_J_RieulKiyeog    ]      
 };
    key <AB03> {        [       c,      C       ],
                        [       Hangul_E,       Hangul_J_Khieuq ]       };
    key <AC03> {        [       d,      D       ],
                        [       Hangul_I,       Hangul_J_RieulPieub     ]       };
    key <AD03> {        [       e,      E       ],
                        [       Hangul_YEO,     Hangul_J_NieunJieuj     ]       };
    key <AE03> {        [       3,      numbersign      ],
                        [       Hangul_J_Pieub, Hangul_J_Jieuj  ]       };
    key <AB04> {        [       v,      V       ],
                        [       Hangul_O,       Hangul_J_KiyeogSios     ]       };
    key <AC04> {        [       f,      F       ],
                        [       Hangul_A,       Hangul_J_RieulMieum     ]       };
    key <AD04> {        [       r,      R       ],
                        [       Hangul_AE,      Hangul_J_RieulHieuh     ]       };
    key <AE04> {        [       4,      dollar  ],
                        [       Hangul_YO,      Hangul_J_RieulPhieuf    ]       };
    key <AB05> {        [       b,      B       ],
                        [       Hangul_U,       question        ]       };
    key <AC05> {        [       g,      G       ],
                        [       Hangul_EU,      Hangul_YAE      ]       };
    key <AD05> {        [       t,      T       ],
                        [       Hangul_EO,      Hangul_J_RieulSios      ]       };
    key <AE05> {        [       5,      percent ],
                        [       Hangul_U,       Hangul_J_RieulTieut     ]       };
    key <AB06> {        [       n,      N       ],
                        [       Hangul_Sios,    minus   ]       };
    key <AC06> {        [       h,      H       ],
                        [       Hangul_Nieun,   0       ]       };
    key <AD06> {        [       y,      Y       ],
                        [       Hangul_Rieul,   5       ]       };
    key <AE06> {        [       6,      asciicircum     ],
                        [       Hangul_YA,      equal   ]       };
    key <AB07> {        [       m,      M       ],
                        [       Hangul_Hieuh,   quotedbl        ]       };
    key <AC07> {        [       j,      J       ],
                        [       Hangul_Ieung,   1       ]       };
    key <AD07> {        [       u,      U       ],
                        [       Hangul_Dikeud,  6       ]       };
    key <AE07> {        [       7,      ampersand       ],
                        [       Hangul_YAE,     leftdoublequotemark     ]       };
    key <AB08> {        [       comma,  less    ],
                        [       comma,  comma   ]       };
    key <AC08> {        [       k,      K       ],
                        [       Hangul_Kiyeog,  2       ]       };
    key <AD08> {        [       i,      I       ],
                        [       Hangul_Mieum,   7       ]       };
    key <AE08> {        [       8,      asterisk        ],
                        [       Hangul_YI,      rightdoublequotemark    ]       };
    key <AB09> {        [       period, greater ],
                        [       period, period  ]       };
    key <AC09> {        [       l,      L       ],
                        [       Hangul_Jieuj,   3       ]       };
    key <AD09> {        [       o,      O       ],
                        [       Hangul_Cieuc,   8       ]       };
    key <AE09> {        [       9,      parenleft       ],
                        [       Hangul_U,       rightsinglequotemark    ]       };
    key <AB10> {        [       slash,  question        ],
                        [       Hangul_O,       exclam  ]       };
    key <AC10> {        [       semicolon,      colon   ],
                        [       Hangul_Pieub,   4       ]       };
    key <AD10> {        [       p,      P       ],
                        [       Hangul_Phieuf,  9       ]       };
    key <AE10> {        [       0,      parenright      ],
                        [       Hangul_Cieuc,   asciitilde      ]       };
    key <AC11> {        [       apostrophe,     quotedbl        ],
                        [       Hangul_Tieut,   period  ]       };
    key <AD11> {        [       bracketleft,    braceleft       ],
                        [       parenleft,      percent ]       };
    key <AE11> {        [       minus,  underscore      ],
                        [       parenright,     semicolon       ]       };
    key <AD12> {        [       bracketright,   braceright      ],
                        [       less,   slash   ]       };
    key <AE12> {        [       equal,  plus    ],
                        [       greater,        plus    ]       };
    key <BKSL> {        [       backslash,      bar     ],
                        [       colon,  slash   ]       };
    // End alphanumeric section

    // Begin modifier mappings

//    modifier_map Shift  { Shift_L };
//    modifier_map Lock   { Caps_Lock, ISO_Lock };
//    modifier_map Control{ Control_L };
//    modifier_map Mod3   { Mode_switch };
};
};

Reply via email to