Windows: change keyboard layout to Japanese in Windows 8

Accidentally, I have my MacBook (MC516) keyboard changed to Japanese layout after a water-pouring hazard happened to him. Keyboard layout switching work is automatic in OS X and easy to be done in Linux (KDE environment), but I had a little trouble in Windows 8 since there is no GUI options.

After reading this article:

I managed to get it switched:

  1. launch Device Management (Win+X, M);
  2. double click keyboard, select “Driver”-“Update Driver…”;
  3. select “Browse”-“Select from List”-Uncheck “Show Compatible Hardwars”-“(Standard Keyboard)”-“Japanese PS/2 Keyboard (106/109 Key)”-“Next”-“Yes”;
  4. reboot;
  5. launch regedit (Win+R, regedit);
  6. navigate to “\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layouts”;
  7. select “00000804”, change “Layout File” from “KBDUS.DLL” to “KBDJPN.DLL”;
  8. select other keyboard layouts ends with “0804” (stands for Chinese), change “Layout File” from “KBDUS.DLL” to “KBDJPN.DLL”;
  9. reboot;
  10. everything is as cool as OS X and KDE now.

Yeah, very straightforward.

CLI: replace one character in filenames recursively

I accidentally ran into a phenomenon that in a very big folder, I have so many files that has a character “·” and I need to remove it. At that time I have two options, either write a program my self or use existing command line tool to achieve my goal. At last I decided to use command line tool since it’s robust, well designed, commonly useful, efficient and time-saving.

All I need to know is find and rename, find tool is available on any UNIX and UNIX-like platforms, while rename is not available in Linux (AFAIC). So I used my LinuxMint to finish this task, very straightforward, here it goes:

find . -name “*.*” -exec rename ‘s/•//’ {} \;

I guess this “find . -name “xxx” {} \;” thing is just for recursive finding and “rename ‘s/•//'” did the trick of renaming.

Cool, CLI and Linux may make your life much easier. :-)