Skip to content

Instantly share code, notes, and snippets.

@airblade
Last active November 30, 2017 10:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save airblade/a523bc7dce9de9801846b81bd6638477 to your computer and use it in GitHub Desktop.
Save airblade/a523bc7dce9de9801846b81bd6638477 to your computer and use it in GitHub Desktop.
Karabiner (not Karabiner-Elements)
<?xml version="1.0"?>
<root>
<item>
<name>Change Plus-minus key</name>
<appendix>Plusminus to underscore</appendix>
<identifier>private.plusminus_to_underscore_r</identifier>
<autogen>
__KeyToKey__
KeyCode::UK_SECTION, ModifierFlag::SHIFT_R,
KeyCode::MINUS, ModifierFlag::SHIFT_L
</autogen>
</item>
<item>
<name>Change Plus-minus key</name>
<appendix>Plusminus to underscore</appendix>
<identifier>private.plusminus_to_underscore_l</identifier>
<autogen>
__KeyToKey__
KeyCode::UK_SECTION, ModifierFlag::SHIFT_L,
KeyCode::MINUS, ModifierFlag::SHIFT_L
</autogen>
</item>
<item>
<name>Change Section key</name>
<appendix>Section to Hash</appendix>
<identifier>private.section_to_hash</identifier>
<autogen>
__KeyToKey__
KeyCode::UK_SECTION,
KeyCode::KEY_3, ModifierFlag::OPTION_L
</autogen>
</item>
<item>
<name>Shift_L and CapsLock</name>
<identifier>private.change_shift_l</identifier>
<appendix>Minus while Caps Lock on to underscore</appendix>
<autogen>
__KeyToKey__
KeyCode::MINUS, ModifierFlag::CAPSLOCK,
KeyCode::MINUS, ModifierFlag::SHIFT_L
</autogen>
<appendix>Shift_L on its own to turn off caps lock</appendix>
<appendix>Shift_L+key works as normal</appendix>
<autogen>
__KeyOverlaidModifier__
KeyCode::SHIFT_L, ModifierFlag::CAPSLOCK,
KeyCode::SHIFT_L, ModifierFlag::CAPSLOCK,
KeyCode::CAPSLOCK
</autogen>
<appendix>Double-tap Shift_L to turn on CapsLock</appendix>
<autogen>
__DoublePressModifier__
KeyCode::SHIFT_L,
KeyCode::SHIFT_L,
KeyCode::CAPSLOCK
</autogen>
</item>
<item>
<name>Shift_R and CapsLock</name>
<identifier>private.change_shift_r</identifier>
<appendix>Shift_R on its own to turn off caps lock</appendix>
<appendix>Shift_R+key works as normal</appendix>
<autogen>
__KeyOverlaidModifier__
KeyCode::SHIFT_R, ModifierFlag::CAPSLOCK,
KeyCode::SHIFT_R, ModifierFlag::CAPSLOCK,
KeyCode::CAPSLOCK
</autogen>
<appendix>Double-tap Shift_R to turn on CapsLock</appendix>
<autogen>
__DoublePressModifier__
KeyCode::SHIFT_R,
KeyCode::SHIFT_R,
KeyCode::CAPSLOCK
</autogen>
</item>
</root>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment