Swapping Caps Lock and Control for real!

hazmat

Rusher of Din
Here's something that I haven't seen here, even searching. You can swap your Caps Lock and Control keys for real. Funny that hitting the Caps Lock (where Control used to be), will light up the now Control key. I would prefer both, but this solution is wonderful.

1. Edit /System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns/AppleUSBKeyboard.kext/Contents/Info.plist and add:

< key >Swap control and capslock< /key >
< integer >1< /integer >

(the spaces in the tags are only so they wouldn't get parsed out here; take them out)

under IOKitPersonalities/AppleUSBKeyboard. You can use the PropertyListEditor application that comes with the developer tools to add the property, or of course a text editor.

2. Remove the file /System/Library/Extensions.mkext. This is a device driver cache. The modified AppleUSBKeyboard driver will not be loaded if this exists. The next reboot will rebuild this file with the modified AppleUSBKeyboard driver. (And the reboot will take a bit longer than normal as it builds the file.)

3. Reboot.


That's it! That's from John Fieber. And bless Apple for actually making that an option in 10.1.
 
It isn't, unless you are used to other computers, where Control is where it should be, where your Caps Lock is. It makes so much more sense to be there, with the frequency of use, and convenience of location. At this point I can't live without Control in that position. I use it a lot at the command line, and lots of Unix apps.
 
Hmm.. this doesn't seem to work on my iBook. Is there a different file for built-in keyboards?

Here's what I added it, should it be somewhere else?

Code:
 ...
       <dict >
                < key >AppleUSBKeyboard< /key >
                < dict >
                        < key >Swap control and capslock< /key >
                        < integer >1< /integer >
                        < key >CFBundleIdentifier< /key >
 ...

(without spaces in tags, of course)

thanks!
 
Originally posted by Holy Zoo
Hmm.. this doesn't seem to work on my iBook. Is there a different file for built-in keyboards?

Here's what I added it, should it be somewhere else?

Code:
 ...
       <dict >
                < key >AppleUSBKeyboard< /key >
                < dict >
                        < key >Swap control and capslock< /key >
                        < integer >1< /integer >
                        < key >CFBundleIdentifier< /key >
 ...

(without spaces in tags, of course)

thanks!

Not sure if it makes a difference, but I put it last:

< key >bInterfaceSubClass< /key >
< integer >1< /integer >
< key >Swap control and capslock< /key >
< integer >1< /integer >

Also make sure you delete /System/Library/Extensions.mkext . Otherwise, after rebooting, if it still doesn't change, it's possible the laptop keyboard is different enough not to work. Note that the key does say USB.
 
SWEET!

Now I will not look so stupid when I go from my sparc to my mac!

(my friends make fun of my typing when I do this...)
 
Originally posted by kilowatt
SWEET!

Now I will not look so stupid when I go from my sparc to my mac!

(my friends make fun of my typing when I do this...)

Heh. No, you should make fun of them. ;-)
 
Interesting... it might be useful. Huh.

At first I thought it would be useless, but now I realize that it probably does make sense to have Control there since it's used more often (I rarely use Capslock at all until I use games like Elite Force where I just keep Capslock on to force me to run all the time in the game).
 
... is not a full sentence. I am curious: does the sentence finish

...but from the hand of God is &lt; very common / on the rise / becoming less prevalent / another vestige of illogical superstition in modern Western society / associated with a higher than average preference for light beers and boxer-briefs / ... &gt;
 
Originally posted by hazmat


Not sure if it makes a difference, but I put it last:

< key >bInterfaceSubClass< /key >
< integer >1< /integer >
< key >Swap control and capslock< /key >
< integer >1< /integer >

Also make sure you delete /System/Library/Extensions.mkext . Otherwise, after rebooting, if it still doesn't change, it's possible the laptop keyboard is different enough not to work. Note that the key does say USB.

Thanks hazmat... but unfortunatly, still a no-go. Looks like ibook's (and ti's?) must use some other configuration file?

*sigh* -- I was so looking forward to this! :)

Thanks for the help just the same!
 
Originally posted by Holy Zoo


Thanks hazmat... but unfortunatly, still a no-go. Looks like ibook's (and ti's?) must use some other configuration file?

*sigh* -- I was so looking forward to this! :)

Thanks for the help just the same!

Sorry to hear that. This might give you some info on this: http://www.darwinfo.org/devlist.php3?number=8092 . Possible you can't get to that level. Maybe the uControl you can find on Version Tracker might help. Unless it's been changed since I last tried it, I opted to not use it, since the key still kept its on/off lock function, even though it was Control. I couldn't deal with that.
 
Back
Top