imechinese-localekeyboard-layout

MSKLC under Windows 10: Create custom keyboard layout which supports IME (input method) for Chinese and combined input in Spanish


This question is originally posted by me in Microsoft Community at:

https://answers.microsoft.com/en-us/windows/forum/windows_10-other_settings/msklc-under-windows-10-create-custom-keyboard/8c5a7137-d575-4247-8ab3-b4dd1e5fb437?tm=1495318604424

In summary: I have created a custom keyboard layout with Microsoft Keyboard Layout Creator 1.4 in Windows 10, it is working but only partially. It cannot:

I am thinking about two ways to solve this:

So, how can I solve this?


Solution

  • I have solved it.

    For the first problem, you must define some "dead keys combinations". The details are explained here:

    http://www.angelfire.com/planet/linguisticsisfun/Creating_a_Keyboard_Using_MSKLC.pdf

    For the second problem, basically you do:

    1. Create your keyboard layout.

    2. Edit the .klc file with a Text Editor, to change the VK code mapping. That is because most of the applications in Microsoft Windows, when you press the hotkeys, detects VK code sent to OS, not the "key chars"(the characters output as you type in a text processing software). So in order to make the key chars of your keyboard layout to match with their VK code, you must do this manually. MSKLC will not change that for you. Some details here:

    http://www.sensefulsolutions.com/2010/08/how-to-fix-keyboard-shortcuts-in-klc-eg.html

    1. Install the layout.

    2. Open your registry editor, enter HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layouts\, find your new keyboard layout at the bottom (mine with name like a0000xxxx). Copy the dll file name. That is the DLL file containing your newly created keyboard layout info.

    3. Go back to the registry father branch, search the language you want to apply this layout, like Chinese or Spanish. You will find several variations with names alike, but the descriptions are self-explanatory and can help you differentiate them.

    4. Simplified Chinese uses KBDUS.dll, that means "keyboard layout for US keyboard". This will apply to MS Pinyin, too. Change this value to your copied DLL name, so that it will load your DLL next time the OS launches.

    5. Restart.

    The result:

    1. I can type English and Chinese pinyin with Microsoft Pinyin with my custom keyboard layout, and I can navigate next/previous page with , and ..
    2. With this keyboard layout I can type Spanish special characters, like ï, á, ç, ñ and without switching to Spanish keyboard.
    3. Hotkeys in any software are working as expected, because now VK code are matched with letters printed on the keys.