Monday, September 19, 2011

Chinese pinyin input with non-QWERTY keyboards (AZERTY, QWERTZ, ...)

I recently bought a new notebook. Buying a new computer still means installing and configuring software as well. Life in the cloud, where art thou? When I added Chinese as an input language, I bumped into something that spurred this blog post and a handy utility that goes with it.


Anyone who has ever used Chinese pinyin input on a non-QWERTY keyboard (AZERTY, QWERTZ, …) knows the deal: the Chinese Input Method Editor (IME) just seems to assume that ALL keyboards are QWERTY keyboards. Mentally switching between for example QWERTY and AZERTY is not that difficult because most letters are in the same location. Contrary, numbers and interpunction signs are organized in a completely different way. So after a while, working like that does get annoying indeed.

The situation is such that most Chinese input users with non-QWERTY keyboards I met seem to just accept this bug as an unavoidable annoyance of using pinyin input. Some go even as far as to buy a QWERTY-equipped notebook just for this reason. That is ludicrous if you know that some minor changes in the Windows register can solve the problem.

How do we change the keyboard layout for Chinese input?

Automatically
I have made a small utility called Chinese Keyboard Layout Changer that will automatically make a backup of any changes and configure a new chosen keyboard layout. It is very straightforward and easy to use. This freeware utility works on Windows computers (tested on XP SP3 and 7 SP1) and changes the keyboard layout for the Microsoft Pinyin IME as well as the Google Pinyin IME.

You can download, use and distribute Chinese Keyboard Layout Changer absolutely free of charge: ChineseKeyboard.zip

Step 1
Make sure your computer has Chinese language support already installed. If you want to use the Google Pinyin IME, make sure you have this installed already as well.

Step 2
Start the Chinese Keyboard Layout Changer utility with administrator privileges. This essentially means that you have to right-click on the program icon and then click on Run as administrator.


Step 3
Select the keyboard layout you want to use for Chinese input. For example, you have to select Belgian (Period) if your computer has a Belgian AZERTY keyboard.


Step 4
Click on the Change Keyboard Layout button.

Step 5
Restart your computer so that the changes can take effect.


Voila! Now you can use Chinese input with your favourite keyboard layout.


If for some reason you want to undo all changes, just follow the same steps as above but skip Step 3 and click on Undo All Changes in Step 4.


Manually
For the technically minded, there is a manual way to achieve the same result using Windows’ built-in Registry Editor. Please do heed the warning below issued by Microsoft with respect to the Registry Editor.

Warning: "Using Registry Editor incorrectly can cause serious, system-wide problems that may require you to re-install Windows to correct them. Microsoft cannot guarantee that any problems resulting from the use of Registry Editor can be solved. Use this tool at your own risk."

Step 1
Fire up Registry Editor (regedit.exe).

Step 2
Navigate to[ HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layouts ]and export this key for backup purposes.

Step 3
Locate the subkey that represents the locale of your keyboard. For example the French locale can be found in key 0000040c

Step 4
Write down the value of the Layout File key of your chosen locale. For example, for the French locale it is KBDFR.DLL

Step 5
Locate the Chinese locale you want to change. For example, for the Chinese (Simplified) locale look for a subkey that ends with 0804.

Step 6
Change the value of the Layout File key of the Chinese locale with the value of the Layout File key you have written down in Step 4.

Step 7
You can optionally change the value of the Layout Text key of the Chinese locale. For example you can change “Chinese (Simplified) - US Keyboard” into “Chinese (Simplified) – French Keyboard”.

Step 8
Restart your computer and you are all set!

5 comments:

  1. Thanks Ahmed! I was getting crazy typing all these "y" instead of "z", it's not like they are useless letters in Chinese pinyin :)

    Works flawlessly here, Win 7 Pro, Swiss French QWERTZ keyboard.

    ReplyDelete
  2. 不用谢 :) I can confirm it also works flawlessly on Win 8.1 Pro.

    ReplyDelete
  3. Manual installation works on Win 10, too! 太谢谢你了!

    ReplyDelete
  4. Replies
    1. Thanks for letting me know 🙂 I moved the file to Google Drive and updated the link.

      Delete