How to use the IME on the Windows command prompt (cmd) to input Japanese

If you've ever tried to input Japanese in a Windows command prompt, you probably found that the typical method to activate the IME does not work. Here is the secret combo:

  • Hit Alt + the 半角/全角 key (for Japanese keyboards), or
  • Hit Alt + the ~ key while in Japanese Input System (MS-IME2002) input mode (for English keyboards).

I've confirmed this works in the following command prompts (on Windows XP): cmd.exe, Cygwin, and Windows PowerShell.

However, the Google Japanese Input Method does not work. This is a known issue (see "Windows XPコマンドプロンプトで使用できない"). Switch to another IME such as Microsoft's instead for the command window.

References: