Skip to content

Instantly share code, notes, and snippets.

@lorne-luo
Last active April 12, 2016 07:03
Show Gist options
  • Save lorne-luo/3e24a50231cb1df2f9ddb2db3933ed46 to your computer and use it in GitHub Desktop.
Save lorne-luo/3e24a50231cb1df2f9ddb2db3933ed46 to your computer and use it in GitHub Desktop.
Karabiner Settings
#!/bin/sh
cli=/Applications/Karabiner.app/Contents/Library/bin/karabiner
$cli set remap.fn_fkeys_to_consumer_f10 1
/bin/echo -n .
$cli set private.holdingEscape_to_Control-L 1
/bin/echo -n .
$cli set switch_input_language 1
/bin/echo -n .
$cli set change_eject_to_delete 1
/bin/echo -n .
$cli set repeat.wait 25
/bin/echo -n .
$cli set private.switch_input_language 1
/bin/echo -n .
$cli set remap.escape2capslock 1
/bin/echo -n .
$cli set private.change_eject_to_delete 1
/bin/echo -n .
$cli set remap.fn_fkeys_to_consumer_f3_lion 1
/bin/echo -n .
$cli set remap.controlL2controlL_escape 1
/bin/echo -n .
$cli set language input 1
/bin/echo -n .
$cli set remap.shiftR2shiftR_capslock 1
/bin/echo -n .
$cli set private.holding_CAPSLOCK_to_Control-L 1
/bin/echo -n .
$cli set remap.fn_fkeys_to_consumer_f1 1
/bin/echo -n .
$cli set remap.fn_fkeys_to_consumer_f5 1
/bin/echo -n .
$cli set remap.fn_fkeys_to_consumer_f7 1
/bin/echo -n .
$cli set remap.optionR_arrow2PgUpDnHomeEnd 1
/bin/echo -n .
$cli set option.emacsmode_controlD 1
/bin/echo -n .
$cli set repeat.initial_wait 250
/bin/echo -n .
/bin/echo
<?xml version="1.0"?>
<root>
<appdef>
<appname>APPSTORE</appname>
<equal>com.apple.appstore</equal>
</appdef>
<item>
<name>Change input sources by Pazu</name>
<identifier>private.change_inputsources</identifier>
<appendix>Ctrl + Option + Cmd + : K = Tranditional Chinses, P = Simple Chinese, L = English </appendix>
<autogen>
__KeyToKey__
KeyCode::OPTION_R,
KeyCode::VK_CHANGE_INPUTSOURCE_CHINESE_TRADITIONAL
</autogen>
<autogen>
__KeyToKey__ KeyCode::K, VK_CONTROL | VK_OPTION | VK_COMMAND |
ModifierFlag::NONE, KeyCode::VK_CHANGE_INPUTSOURCE_CHINESE_TRADITIONAL
</autogen>
<autogen>
__KeyToKey__ KeyCode::L, VK_CONTROL | VK_OPTION | VK_COMMAND |
ModifierFlag::NONE, KeyCode::VK_CHANGE_INPUTSOURCE_US
</autogen>
<autogen>
__KeyToKey__ KeyCode::P, VK_CONTROL | VK_OPTION | VK_COMMAND |
ModifierFlag::NONE, KeyCode::VK_CHANGE_INPUTSOURCE_CHINESE_SIMPLIFIED
</autogen>
</item>
<item>
<name>Use Command_R to Switch Input Language</name>
<append>Use Command_R to Switch Input Language</append>
<identifier>private.switch_input_language</identifier>
<autogen>
__KeyToKey__ KeyCode::COMMAND_R,
KeyCode::SPACE, ModifierFlag::COMMAND_L
</autogen>
</item>
<item>
<name>Change Eject to Forward Delete</name>
<append>Change Eject to Forward Delete</append>
<identifier>private.change_eject_to_delete</identifier>
<autogen>
__ConsumerToKey__ ConsumerKeyCode::EJECT, ModifierFlag::NONE,
KeyCode::FORWARD_DELETE
</autogen>
<autogen>
__KeyToConsumer__ ConsumerKeyCode::EJECT, ModifierFlag::FN,
ConsumerKeyCode::EJECT
</autogen>
</item>
<item>
<name>Change Holding Escape to Control_L</name>
<appendix>(+ When you type Escape only, send Escape)</appendix>
<identifier>private.holdingEscape_to_Control-L</identifier>
<autogen>__KeyOverlaidModifier__ KeyCode::ESCAPE, KeyCode::CONTROL_L, KeyCode::ESCAPE</autogen>
</item>
</root>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment