Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.4: Remap the Caps Lock key to a simple Shift key System 10.4
Tiger only hintTiger 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:
  1. In Terminal, type this:
    cd /System/Library/PreferencePanes/Keyboard.prefPane/\
    Contents/Resources/English.lproj
  2. Change user rights to allow for the modification by typing sudo chmod o+w

  3. Open the folder in Finder: open .

  4. In Finder, duplicate Keyboard.nib.

  5. Rename Keyboard.nib to Keyboard.nib.bak.

  6. Rename Keyboard copy.nib to Keyboard.nib.

  7. Open Keyboard.nib using Interface Builder.

  8. In Interface Builder, open the "Keyboard Advanced" window.

  9. Double-click the first pop-up menu next in that window.

  10. Duplicate one of the menu's items using copy and paste.

  11. Select the duplicate and open the inspector by hitting Command-1.

  12. Rename the item to "Shift."

  13. 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.

  14. 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...]
    •    
  • Currently 3.00 / 5
  You rated: 2 / 5 (4 votes cast)
 
[15,206 views]  

10.4: Remap the Caps Lock key to a simple Shift key | 7 comments | Create New Account
Click here to return to the '10.4: Remap the Caps Lock key to a simple Shift key' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: Remap the Caps Lock key to a simple Shift key
Authored by: enterkeymustdie on Jun 15, '05 11:30:23AM

Can someone who knows what they are doing please expand on this hint and tell me how to remap the evil 'enter' key on a powerbook to something useful (like 'option'). I'll pay handsomely for this tip. The nice utility UControl that had this ability was broken by Tiger and is no longer in development <sob>.



[ Reply to This | # ]
10.4: Remap the Caps Lock key to a simple Shift key
Authored by: englabenny on Jun 15, '05 11:49:44AM

Here's a solution for some keyboards, but it doesn't seem easy:
http://www.snark.de/index.cgi/0007



[ Reply to This | # ]
10.4: Remap the Caps Lock key to a simple Shift key
Authored by: dmydans on Jun 15, '05 12:41:23PM

Yes, I know we're getting off-topic, but please let me second 'EnterKeyMustDie". On my laptop I've become totally addicted to switching the 'Enter' key to 'Option'. I'm lefthanded and I don't know if I can live (much longer) without it!
I've tried the suggested technique twice.
<http://www.snark.de/index.cgi/0007>
both times I hosed my system (no big thing, lottsa backups).
But its a complicated proceedure, evidently a bit above my head.

ttfn dirtbagg



---
ttfn Dirtbagg



[ Reply to This | # ]
10.4: Remap the Caps Lock key to a simple Shift key
Authored by: aglzen on Jun 15, '05 02:23:20PM
To do this remap, you'll want a program called "Doublecommand" http://doublecommand.sf.net

It will kill the useless enter key, give you shift-delete forward delete and a bunch more.. As soon as the developer can get it tweaked for 10.4.

Works perfectly in 10.2 and 10.3 though, until my move to tiger, I was using it on all systems for a year plus, without problem. Hopefully soon for 10.4. Please. My powerbook is a mess of useless keys without it.

[ Reply to This | # ]
10.4: Remap the Caps Lock key to a simple Shift key
Authored by: devlogic on Jun 15, '05 02:42:59PM
robg - it seems to work as is, with one exception; step 2 gives an error if entered as is; I think there's a " ." missing at the end of that particular step.
Since the directions (which I just followed; they work great, except for the little light on my iBook's caps lock key) have you creating a copy of the Keyboard.nib file, then changing file names around so that the "copy" is the "active" nib, there's no need to move the modified file back to the proper location, since you're editing it in place.
I'd probably recommend doing a sudo chmod o-w . at the end, though, just to keep the files safe from further modification...

[ Reply to This | # ]
10.4: Remap the Caps Lock key to a simple Shift key
Authored by: virius on Jun 17, '05 03:38:37AM

Thanks for this helpful hint!

One thing I'd like to note:
Obviously, you have to go to the *.lproj Folder specified through International PrefPane. I tried this hint twice on English.lproj an I wondered why it didn't work – before I realized I have to change the Nib in German.lproj…

The "sudo chmod u+w ." command is the correct one, and to change the name of the copied Nib you can't use the Finder (the .nib Suffix will be kept). Use "sudo mv Keyboard.nib Keyboard.nib.bak" instead.



[ Reply to This | # ]
10.4: Remap the Caps Lock key to a simple Shift key
Authored by: doneitner on Jun 18, '05 06:35:38PM

One additional upshot to the built-in options in the keyboard preferences, for those of us using a PC keyboard with out Mac (either due to a Mac mini or using a KVM to share keyboard between both a PC and a Mac) we can now map the Control and Option keys to the correct positions on the keyboard (by default they're switched on a PC keyboard). This requires zero modifying of the system -- it's already built-in.



[ Reply to This | # ]