Skip to content

Instantly share code, notes, and snippets.

@matthewpalmer
Created January 23, 2013 03:36
Show Gist options
  • Save matthewpalmer/4601687 to your computer and use it in GitHub Desktop.
Save matthewpalmer/4601687 to your computer and use it in GitHub Desktop.
My keyremap4macbook xml file
<?xml version="1.0"?>
<root>
<item>
<name>Swap Space and Tab</name>
<identifier>private.swap_space_and_tab</identifier>
<autogen>--KeyToKey-- KeyCode::SPACE, KeyCode::TAB</autogen>
<autogen>--KeyToKey-- KeyCode::TAB, KeyCode::SPACE</autogen>
</item>
<item>
<name>My Excel Hacks (effective only on Excel)</name>
<appendix>Change Command+2 to Ctrl+U</appendix>
<appendix>Change Control+A to Home</appendix>
<appendix>Change Control+E to End</appendix>
<identifier>private.app_excel_command2_to_ctrlu</identifier>
<only>EXCEL</only>
<autogen>--KeyToKey-- KeyCode::KEY_2, VK_COMMAND, KeyCode::U, ModifierFlag::CONTROL_L</autogen>
<autogen>--KeyToKey-- KeyCode::A, VK_CONTROL, KeyCode::HOME</autogen>
<autogen>--KeyToKey-- KeyCode::E, VK_CONTROL, KeyCode::END</autogen>
</item>
<item>
<name>My TrackPad LeftClick Hack</name>
<appendix>Command+LeftClick to F12 (only on MacBookPro2,1 Trackpad)</appendix>
<identifier>private.pointing_leftclick2f12_trackpad</identifier>
<device_only>DeviceVendor::APPLE_COMPUTER,DeviceProduct::APPLE_INTERNAL_KEYBOARD_TRACKPAD_0x021a</device_only>
<autogen>--PointingButtonToKey-- PointingButton::LEFT, VK_COMMAND, KeyCode::F12</autogen>
</item>
<item>
<name>CAPSLOCKTOCMDR</name>
<appendix>this is to remap caps lock to cmdR</append>
<identifier>private.swap_capslock</identifier>
<autogen>
--KeyToKey--
KeyCode::PC_APPLICATION,
KeyCode::R, ModifierFlag::COMMAND_L
</autogen>
</item>
<item>
<name>PGDOWNTOCMDZ</name>
<appendix>this is to remap pgdown to cmdz</append>
<identifier>private.swap_pgdown</identifier>
<autogen>
--KeyToKey--
KeyCode::PAGEDOWN,
KeyCode::Z, ModifierFlag::COMMAND_L
</autogen>
</item>
<item>
<name>endTOCMDs</name>
<appendix>this is to remap end to cmds</append>
<identifier>private.swap_end</identifier>
<autogen>
--KeyToKey--
KeyCode::END,
KeyCode::S, ModifierFlag::COMMAND_L
</autogen>
</item>
<!-- ============================================================ -->
<!-- An example of appdef -->
<appdef>
<appname>APPSTORE</appname>
<equal>com.apple.appstore</equal>
</appdef>
<item>
<name>Space to Tab on App Store.app</name>
<identifier>private.appdef</identifier>
<only>APPSTORE</only>
<autogen>--KeyToKey-- KeyCode::SPACE, KeyCode::TAB</autogen>
</item>
<!-- ============================================================ -->
<!-- An example of devicevendordef,deviceproductdef -->
<devicevendordef>
<vendorname>HEWLETT_PACKARD</vendorname>
<vendorid>0x03f0</vendorid>
</devicevendordef>
<deviceproductdef>
<productname>MY_HP_KEYBOARD</productname>
<productid>0x0224</productid>
</deviceproductdef>
<item>
<name>Space to Tab on MY_HP_KEYBOARD</name>
<identifier>private.deviceproductdef</identifier>
<device_only>DeviceVendor::HEWLETT_PACKARD, DeviceProduct::MY_HP_KEYBOARD</device_only>
<autogen>--KeyToKey-- KeyCode::SPACE, KeyCode::TAB</autogen>
</item>
<!-- ============================================================ -->
</root>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment