My Place

Simple thoughts

KeyRemap4Macbook

An awesome program

KeyRemap4Macbook is an awesome program. Just go ahead and download it, if you want fine grained control over your keyboard. The only thing I haven’t been able to do is use it to switch my iMac 27” between external and internal display.

Through the uber simple Keyboard preference I have my useless CAPS LOCK key set to COMMAND key, this works in almost every program except when I am in terminal in which I am using alpine and emacs, both of these make heavy use of the control key and it is a pain to use my pinky. So after fooling with it for a few hours one day I heard about KeyRemap4Macbook which contrary to the name works on any mac. The documentation is a bit of a pain but I managed to make it through it using the examples file. The one thing you must do is restart or you will not even have a private.xml to edit.

This is my little control that is used to set the COMMAND_L key to CONTROL_L ONLY and make terminal now extremely useful instead of hurting my pinky figure. I named it Capslock as control since that is the physical keyname and capslock is command as specified in the stock OSX keyboard preferences.

<?xml version="1.0"?>
<root>
    <item>
    <name>Terminal Uses CapsLock as Control</name>
    <appendix></appendix>
    <identifier>remap.capslock_ctrl</identifier>
    <only>TERMINAL</only>
    <autogen>--KeyToKey-- KeyCode::COMMAND_L,KeyCode::CONTROL_L</autogen>
    </item>
    <item>
        <name>Switch Monitors</name>
        <identifier>remap.switchmonitor</identifier>
    </item>
</root>