A little while back I bought a Japanese keyboard to use with my laptop while docked. It's a Microsoft Basic Keyboard 1.0A, with 109 keys. Not only does it have more keys than a standard US keyboard, but the layout is slightly different (such as the location of the apostrophe ' and at-symbol @ keys). To enable this layout in the US version of Windows XP, I configured IME by adding the Japanese keyboard layout to the Japanese input language service. Unfortunately, this didn't work. A bit of searching turned up this very helpful page written by Michael Eng for installing Japanese keyboards on Windows XP (scroll down to the bottom of the page since it also contains instructions for NT4 and Win2k).
Not only must you add the Japanese layout to IME, but you must also install a Japanese keyboard driver. Here's the set of instructions, updated to Windows XP SP2. Of course, use at your own risk.
1. Navigate to Start->Control Panel->Keyboard
2. On the Hardware tab, click Properties (note that the current driver is probably "Standard 101/102-Key or Microsoft Natural PS/2 Keyboard")
3. On the Driver tab, click Update Driver...
4. The Hardware Update Wizard launches. When it asks if Windows can connect to Windows Update to search for software, select "No, not this time" and click Next
5. Select "Install from a list or specific location (Advanced)" and click Next
6. Select "Don't search. I will choose the driver to install" and click Next
7. Uncheck "Show compatible hardware"
8. Select "Japanese PS/2 Keyboard (106/109 Key)" from the manufacturer "(Standard keyboards)" and click Next
9. Click Yes to continue with the installation when the warning about installing incompatible device drivers appears
10. Click Yes to continue with the installation when the warning about replacing PS/2 mouse port drivers appears
11. Click Finish and reboot
A friend of mine said he didn't need to jump through these hoops, that his Japanese keyboard worked out of the box on his US WinXP machine. Not so in my case. It's interesting that step 7 is required; Windows seems unable to detect that I have attached a Japanese keyboard. In fact, if Windows could detect it, this whole workaround probably wouldn't be needed.