How do I remap Korean 106-key keyboard's Hangul and Hanja keys to work properly?

Discussion in 'Installation and Configuration' started by Chang-Beom Park, May 13, 2009.

  1. Chang-Beom Park

    Chang-Beom Park

    I use an Korean 106 key layout keyboard.
    I've found that Hangul(Korean/English toggle) key and Hanja(make Korean character into Chinese one) key didn't work.
    So I would like you to add these keys to work properly.

    Here is a system environment list. But that doesn't affect the keyboard problem except locale setting.:
    1. Mac OS Version : 10.5.7(9J61)
    In International of System Preferences, Languages list is English first and Korean.
    2. Parallels Build # : 4.0.3844
    3. What kind of computer : MacBook 1,1
    6. If you are using a BootCamp configuration or not : no
    7. Did you upgrade from a BETA : no
    9. If Parallels Tools are installed : yes

    In Korea, there are two kinds of method to change input method between Korean and English and input Hanja.

    First is using Hangul key and Hanja key. These keys are equipped with 103 or 106 key Korean keyboard.

    Second is using right alt and control key to Hangul and Hanja each. It's just generate raw alt and control keycode, so to remapping job is each operating system's work. And in my experience with Windows XP on Parallels, it works out of the box.

    The problem is first method. It has a unique PS/2 scancode or USB HID usage ID.
    Two key's HID USB usage ID is 0x90(Hangul) and 0x91(Hanja) each. I refered to USB HID on Microsoft PS/2 Scan Code Translation Table and Universal Serial Bus HID Usage Tables on Actually, these keys are equipped with PC(not Mac) keyboards only.

    At this point Apple did funny things that Kana and Eisu key(they are equipped with nowadays Japanese JIS Mac keyboards) generate same USB HID usage ID of Hangul and Hanja has. Below code is a part of Cosmo_USB2ADB.c at line 182~183
    Thanks to Apple ironically, Korean OSX users can use Hangul and Hanja key to change language input method with 3rd party Korean input method program.

    But it isn't recognized on Parallels unfortunately. I tested Windows and Linux also. Showkey command in Linux doesn't make any scancode for these two keys.

    I did some test to find a solution.

    I looked at ~/Library/Preferences/Parallels/???.kbd files and did a Hangul,Hanja key recognize test with it.
    Am I right that Parallels use QT-mac's Qt.Key constant for recognizing key input from OS X?
    During some testing with Japanese's 5 input method keys which appeared in Parallels Keyboard remapping setting, I found that 147 is Hangul key and 148 is Hanja key for virtual machines. And 147 and 148 work out of the box when it's remapped with <UseCmd> on virtual Windows XP.

    I supposed that above things and Parallels recognize Kana and Eisu keys.
    Qt.Key_Kanji(0x01001121) -> Hangul(147)
    Qt.Key_Eisu_toggle(0x01001130) -> Hanja(148)
    The reason why I locate that way is answered when you look at attached picture.

    So, I added some remapping block into Windows.kbd like that
    After remapping is done, testing is failed.

    To find proper Kana and Eisu <CustomKey> value which recognized by Parallels, I have tested between Qt.Key_SingleCandidate and Qt.Key_Hangul_Special in below site's Qt.key list.
    But it is failed also.

    At last, I think that Parallels recognize Kana and Eisu key only when Japanese laguange is first locale preference on System Preferences. I don't know the answer.

    If my any test methods or assumtions were incorrect or any idea, please let me know.
    If Parallels don't have recognized Kana and Eisu key yet, please fix the project to support it.

    Attached Files:

Share This Page