Skip to content

Instantly share code, notes, and snippets.

@Igotit
Last active August 29, 2015 14:04
Show Gist options
  • Save Igotit/3540ffd07bcbc2c9f30a to your computer and use it in GitHub Desktop.
Save Igotit/3540ffd07bcbc2c9f30a to your computer and use it in GitHub Desktop.
Karabiner configuration
<?xml version="1.0"?>
<root>
<item>
<name>Private</name>
<!-- =============================================================== -->
<item>
<name>Key Swap</namw>
<item>
<name>Fn+Tab to CapsLock</name>
<identifier>private.fn_tab_to_capslock</identifier>
<autogen>
--KeyToKey--
KeyCode::TAB, ModifierFlag::FN,
KeyCode::CAPSLOCK
</autogen>
</item>
</item>
<!-- =============================================================== -->
<item>
<name>Xcode only</name>
<item>
<name>Ctrl+O to insert new line</name>
<identifier>private.app_xcode_ctrl_o</identifier>
<only>XCODE</only>
<autogen>
__KeyToKey__
KeyCode::O, MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_CONTROL,
KeyCode::E, ModifierFlag::CONTROL_L, KeyCode::ENTER
</autogen>
</item>
<item>
<name>CMD+D to delete current line</name>
<identifier>private.app_xcode_cmd_d</identifier>
<only>XCODE</only>
<autogen>
__KeyToKey__
KeyCode::D, MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_COMMAND,
KeyCode::A, ModifierFlag::CONTROL_L,
KeyCode::N, ModifierFlag::CONTROL_L | ModifierFlag::SHIFT_L,
KeyCode::DELETE,
KeyCode::E, ModifierFlag::CONTROL_L,
</autogen>
</item>
</item>
<!-- =============================================================== -->
<item>
<name>Search With Google Chrome</name>
<item>
<name>Use Ctrl+BrightnessDown</name>
<identifier>private.swap_ctrl_brightness_down_to_search_with_chrome</identifier>
<autogen>
--ConsumerToKey--
ConsumerKeyCode::BRIGHTNESS_DOWN, ModifierFlag::CONTROL_L,
KeyCode::L, ModifierFlag::CONTROL_L | ModifierFlag::OPTION_L | ModifierFlag::COMMAND_L
</autogen>
</item>
<item>
<name>Use F13</name>
<identifier>private.f13_to_search_with_google_chrome</identifier>
<autogen>
__KeyToKey__
KeyCode::F13,
KeyCode::L, ModifierFlag::CONTROL_L | ModifierFlag::OPTION_L | ModifierFlag::COMMAND_L
</autogen>
</item>
</item>
<!-- =============================================================== -->
<item>
<name>HHKB Pro 2</name>
<deviceproductdef>
<productname>HHKB_Pro_2</productname>
<productid>0x0853</productid>
</deviceproductdef>
<item>
<name>Swap Delete, Backquote and Backslash</name>
<identifier>private.hhkb_pro_2.swap_delete_backquote_backslash</identifier>
<device_only>DeviceProduct::HHKB_Pro_2</device_only>
<autogen>__KeyToKey__ KeyCode::DELETE, KeyCode::BACKSLASH</autogen>
<autogen>__KeyToKey__ KeyCode::BACKSLASH, KeyCode::BACKQUOTE</autogen>
<autogen>__KeyToKey__ KeyCode::BACKQUOTE, KeyCode::DELETE</autogen>
</item>
<item>
<name>Swap Esc to Backquote</name>
<identifier>private.hhkb_pro_2.swap_esc_to_backquote</identifier>
<device_only>DeviceProduct::HHKB_Pro_2</device_only>
<autogen>__KeyToKey__ KeyCode::ESCAPE, KeyCode::BACKQUOTE</autogen>
<autogen>
__KeyToKey__
KeyCode::BRACKET_LEFT, MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_CONTROL,
KeyCode::ESCAPE
</autogen>
</item>
<item>
<name>F1 to Search With Google Chrome</name>
<identifier>private.hhkb_pro_2.f1_to_search_with_google_chrome</identifier>
<device_only>DeviceProduct::HHKB_Pro_2</device_only>
<autogen>
__KeyToKey__
KeyCode::F1,
KeyCode::L, ModifierFlag::CONTROL_L | ModifierFlag::OPTION_L | ModifierFlag::COMMAND_L
</autogen>
</item>
<item>
<name>F3/F4 to Mission Control/Dashboard</name>
<identifier>private.hhkb_pro_2.f3_f4_to_functional_keys</identifier>
<device_only>DeviceProduct::HHKB_Pro_2</device_only>
<autogen>__KeyToKey__ KeyCode::F3, KeyCode::MISSION_CONTROL</autogen>
<autogen>__KeyToKey__ KeyCode::F4, KeyCode::DASHBOARD</autogen>
</item>
<item>
<name>F10/F11/F12 to Volume Mute/Down/Up</name>
<identifier>private.hhkb_pro_2.f10_f11_f12_to_volume_mute_down_up</identifier>
<device_only>DeviceProduct::HHKB_Pro_2</device_only>
<autogen>__KeyToKey__ KeyCode::F10, ConsumerKeyCode::VOLUME_MUTE</autogen>
<autogen>__KeyToKey__ KeyCode::F11, ConsumerKeyCode::VOLUME_DOWN</autogen>
<autogen>__KeyToKey__ KeyCode::F12, ConsumerKeyCode::VOLUME_UP</autogen>
</item>
</item>
<!-- =============================================================== -->
</item>
</root>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment