Swap control and caps lock on USB keyboards

Feb 22, '02 09:41:00AM

Contributed by: Cadre

For all you old-school people out there, you can swap the left control and caps-lock keys very easily in Mac OS X (if you have a USB keyboard).

In the file System -> Library -> Extensions -> IOUSBFamily.kext -> Contents -> PlugIns -> AppleUSBKeyboard.kext -> Contents -> Info.plist, look for the IOKitPersonalities key, and the AppleUSBKeyboard key within that. Once there, add these lines:

Swap control and capslock
1
When you have done this, remove /System/Library/Extensions.mkext and restart. Removing the Extensions.mkext file forces OS X to rebuild the device driver cache with the modified file at the next restart (which may take longer than normal as the file is rebuilt).

This will not work on ADB keyboards (which means this won't work on Powerbooks since those are actually ADB keyboards).

This tip is originally posted by John Fieber on his site. You can find a copy of the properly edited plist file there if you need a complete example of what the finished product looks like. I felt it needed to posted at a higher traffic site so that perhaps more people can be shown the light. I'll leave it up to the reader to figure out why this is useful.

[Editor's note: I can't vouch for this one, as it would take me forever to relearn decades of habits! However, when I looked at my version of the Info.plist file, I found that I did not have the AppleUSBKeyboard key within the IOKitPersonalities key, despite typing this from a USB keyboard!]


Panther proven!

NOTE: This hint will work with Panther, but with some changes. The correct file to edit is /System -> Library -> Extensions -> IOUSBFamily.kext -> Contents -> PlugIns -> IOUSBHIDDriver.kext -> Contents -> Info.plist. Within that Info.plist file, the property to edit is IOKitPersonalities/Generic Keyboard, and you must touch /System/Library/Extensions to get it to work now.

This is all documented here:
http://ella.slis.indiana.edu/~jfieber/osx/

Comments (17)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20020222094159459