Vebjorn Ljosa » Software » Consistent Keyboards
When you connect a PC-style keyboard to a Mac, the Windows key acts as the Command key and the Alt key acts like the Option key. In other words, the keys' positions are reversed compared to an Apple keyboard. You can swap them in System Preferences, but the swap affects all keyboards, so if you sometimes use the keyboard built into your MacBook and sometimes an external keyboards, you have to turn the swapping on or off each time you switch from one keyboard to the other (e.g., when you arrive at work in the morning). AppleScript UI scripting can make this chore somewhat less painful, but it is still cumbersome and slow.
Consistent Keyboards is a little daemon that runs in the background and swaps the Option and Command keys—but only on PC-style keyboards. Thus you don't have to do anything when you switch between keyboards.
Consistent Keyboards runs on Intel- and PowerPC-based Mac computers. It works with Mac OS X 10.4 ("Tiger") and Mac OS X 10.5 ("Leopard"), but 10.5 already has similar functionality in System Preferences.
Consistent Keyboards is open source, covered by a BSD-style license (see license.txt).
If you discover that Consistent Keyboards does not swap the keys on your PC-style keyboard, or that it does swap them on your Mac keyboard, please look in the file /var/log/system.log for lines like the following and send them to me:
Aug 14 13:18:39 GM3B6-DD5 Consistent Keyboards: Detected keyboard of type 40.
Thanks to Claudio Satriano for providing details about the Logitech Classic Keyboard 200, which is supported in version 0.5.