10.4: Remap the Caps Lock key to a simple Shift key
Jun 15, '05 09:51:00AM
Contributed by: gloubibou
Tiger offers the possibility to remap modifier keys using the Keyboards & Mouse preferences pane. This is a great way to disable the Caps Lock key, which I happen to hit all too often when going for the Shift key. I, however, wanted to one-up this by actually remapping the Caps Lock key to the Shift key. Doing so would keep the key in line with its original task, but prevent it from sticking.
After some poking around in the Global defaults, where the modifier mapping is stored, I had a look at the Keyboards & Mouse NIB file. Sure enough there was a way to modify it so the mapping could be done in standard UI (though the Developer Tools are required).
The procedure is:
- In Terminal, type this:
cd /System/Library/PreferencePanes/Keyboard.prefPane/\
Contents/Resources/English.lproj
- Change user rights to allow for the modification by typing sudo chmod o+w
- Open the folder in Finder: open .
- In Finder, duplicate Keyboard.nib.
- Rename Keyboard.nib to Keyboard.nib.bak.
- Rename Keyboard copy.nib to Keyboard.nib.
- Open Keyboard.nib using Interface Builder.
- In Interface Builder, open the "Keyboard Advanced" window.
- Double-click the first pop-up menu next in that window.
- Duplicate one of the menu's items using copy and paste.
- Select the duplicate and open the inspector by hitting Command-1.
- Rename the item to "Shift."
- Set the value of the tag field to 1. The existing tags are -1, 0, 2, 3, 4. Clearly someone planned for the Shift key.
- Save and quit Interface Builder.
You're done now, so try out the modified Preferences Pane.
[robg adds: I haven't tested this one, and I think the end of the instructions are missing -- it seems you'd need to put the modified Keyboard.nib file back into the path specified in the first step...]
Comments (7)
Mac OS X Hints
http://hints.macworld.com/article.php?story=20050529121127515