Monday, September 12, 2011

HOWTO: Japanese IME with non Japanese Keyboard in Windows 7 (with switching between kana and alphabet :-)


When you start learning Japanese, you will at some point find yourself looking for a way to write Japanese on a PC. That's where the IME comes into play.
The IME, the Input-Method-Editor is the gate to thousands of Chinese characters via a normal keyboard. It is a little piece of software that converts keystrokes into a script that is not directly accessible via keyboard. To write Japanese, the user would enter text in romaji and the IME will transform it into the right form. E.g. to write (つくえ, desk), you would press the buttons T, U, K, U and E and the IME will convert that text into the Kanji . Most of the time, there will be more then one way to convert the input, e.g. there are multiple kanji with the same reading, or the word might be commonly written in kana as well. To address this, the IME gives the user a list of suggestions on how to convert the input. E.g. かみ could be , , , 加味, カミ, 噛み or even something else.
There used to be a commercial IMEs that users would have to buy extra in addition to their operating system. Nowadays, at least the two major OS’ Windows and Mac OS have built in, decent IMEs. I don’t see any need to pay money for another 3rd party IME, but am willing to be told better. This tutorial will be about the Windows IME. It’s the one I like most so far, though I must say I have very little experience with others.
Step 1 - Activate the IME as you're default input
Open up Control Panel ⇒ click on Region and Language ⇒ Keyboards and Languages ⇒ Change Keyboards ⇒ Add ⇒ Choose Japanese (Japan), Keyboard, Mircosoft IME ⇒ select it as the default input language.
Now you should see the the IME icons in your taskbar. Log off and on again if not.

Step 2 - Let's have a first look
Open Word or something the like. At first, you will most probably still be writing the same old Roman letters. Usually the IME is in Alphanumeric mode, wich means you'll enter text just the way you are used to from English. Click on the "A" symbol in the taskbar and you'll get a list of other modes. Most of the time, you'll be using either alphanumeric or hiragana mode, it is represented by a hiragana あ in the taskbar. Try inputting text with it.
In hiragana mode, you can write a word or sentence and then press the spacebar to choose from a variety of options. Type tukue and the hiragana should appear underlined. The line marks the part the IME is going to convert () . Now hit the spacebar to change it into 机. Notice that the word is still underlined, the conversion not yet set. Hit spacebar again and a list with other possible conversions appears. In the case of つくえ you can choose from kanji, hiragana or katakana. Choose the version you prefer and press Enter to end the conversion. The underline goes away. You have written your first word. Next, try writing a whole sentence at once and convert it. You should be able to jump around parts of the underlined, to be converted sentence with tab and choose their characters individually.
Step 3 - Make the IME usable
OK, so that worked out great and is fun for a bit but as soon as you try using the IME for more than just a few words a day you'll be annoyed by:
  • Some keys don't behave the way they are supposed to. By switching to the Japanese IME, you also chose the Japanese keyboard layout. This is not too bad if you usually use an English or American layout, but is really bothersome if you are used to say a QWERTZ or ATERZY layout. You might be missing non English letters like ä or à altogether.
  • Switching between the input modes is annoying. Every time you want to switch between them you have to grab your mouse and click on the tiny symbol in the taskbar. A real Japanese keyboard would have dedicated key to cycle trough those modes, but not yours.
First, lets correct the layout problem. You will need to know your keyboard layouts default .dll file used by windows. Use a search engine of your choice or have a look here. A layout file should be named something like kbdsomething.dll

Next, click start, write "regedit" into the little box and press Enter, say yes to the warning, you should now be looking at the registry Editor. On the left side you can see a list of folders. In this list, navigate to: Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000411.
These are the settings for the Japanese IME. You see them on the right.

Right click on "Layout File" ⇒ Modify and change the entry to match your layout you've looked up before.


Now reboot and the IME should be set to the new old layout :-)

But still, there are no buttons to switch between the input modes.
Right click on the "JP" in the taskbar ⇒ settings ⇒ Microsoft IME ⇒ Properties ⇒ Editing. Under Key template, click advance.


Choose a keystroke you prefer, I recommend Ctrl+Space, it works fine for me. In the "no Input/Converted Strings" column: right click ⇒ modify, choose IME ON/OFF from the list and remove all the assignments from the other columns.

That's it :-) Close all remaining windows. You can now switch between hiragana and alphanumeric input with your keyboard by pressing ctrl and spacebar.