Skip to content

Instantly share code, notes, and snippets.

@greneholt
Last active October 2, 2015 00:17
Show Gist options
  • Save greneholt/2131867 to your computer and use it in GitHub Desktop.
Save greneholt/2131867 to your computer and use it in GitHub Desktop.
Semicolon home row arrow mode and keyboard flip with KeyRemap4MacBook
<?xml version="1.0"?>
<root>
<item>
<name>Home Row Arrow Mode</name>
<list>
<item>
<name>What's "Home Row Arrow Mode"?</name>
<appendix>Single Key Press Semicolon turns on "Home Row Arrow Mode"</appendix>
<appendix>Then you can use JKIL as Left/Down/Up/Right.</appendix>
<appendix>Also, U = home, O = end, H = page up, and N = page down.</appendix>
<identifier vk_config="true">notsave.homerow_arrow_mode</identifier>
<autogen>--KeyToKey-- KeyCode::J, KeyCode::CURSOR_LEFT</autogen>
<autogen>--KeyToKey-- KeyCode::K, KeyCode::CURSOR_DOWN</autogen>
<autogen>--KeyToKey-- KeyCode::I, KeyCode::CURSOR_UP</autogen>
<autogen>--KeyToKey-- KeyCode::L, KeyCode::CURSOR_RIGHT</autogen>
<autogen>--KeyToKey-- KeyCode::U, KeyCode::CURSOR_LEFT, ModifierFlag::COMMAND_L</autogen>
<autogen>--KeyToKey-- KeyCode::O, KeyCode::CURSOR_RIGHT, ModifierFlag::COMMAND_L</autogen>
<autogen>--KeyToKey-- KeyCode::H, KeyCode::PAGEUP</autogen>
<autogen>--KeyToKey-- KeyCode::N, KeyCode::PAGEDOWN</autogen>
</item>
<item>
<name>Single Key Press Smicolon turns on "Home Row Arrow Mode"</name>
<identifier>remap.homerow_mode_semicolon_no_repeat</identifier>
<autogen>--KeyOverlaidModifier-- KeyCode::SEMICOLON, KeyCode::VK_CONFIG_SYNC_KEYDOWNUP_notsave_homerow_arrow_mode, KeyCode::SEMICOLON</autogen>
</item>
</list>
</item>
<item>
<name>Keyboard Flip Mode</name>
<list>
<item>
<name>What is "Keyboard Flip Mode"?</name>
<appendix>Single Key Press Space Flips the keyboard horizontally.</appendix>
<appendix>J &lt;-&gt; F, K &lt;-&gt; D, etc.</appendix>
<identifier vk_config="true">notsave.keyboard_flip_mode</identifier>
<autogen>--KeyToKey-- KeyCode::Y, KeyCode::T</autogen>
<autogen>--KeyToKey-- KeyCode::U, KeyCode::R</autogen>
<autogen>--KeyToKey-- KeyCode::I, KeyCode::E</autogen>
<autogen>--KeyToKey-- KeyCode::O, KeyCode::W</autogen>
<autogen>--KeyToKey-- KeyCode::P, KeyCode::Q</autogen>
<autogen>--KeyToKey-- KeyCode::H, KeyCode::G</autogen>
<autogen>--KeyToKey-- KeyCode::J, KeyCode::F</autogen>
<autogen>--KeyToKey-- KeyCode::K, KeyCode::D</autogen>
<autogen>--KeyToKey-- KeyCode::L, KeyCode::S</autogen>
<autogen>--KeyToKey-- KeyCode::SEMICOLON, KeyCode::A</autogen>
<autogen>--KeyToKey-- KeyCode::N, KeyCode::V</autogen>
<autogen>--KeyToKey-- KeyCode::M, KeyCode::C</autogen>
<autogen>--KeyToKey-- KeyCode::COMMA, KeyCode::X</autogen>
<autogen>--KeyToKey-- KeyCode::DOT, KeyCode::Z</autogen>
<autogen>--KeyToKey-- KeyCode::T, KeyCode::Y</autogen>
<autogen>--KeyToKey-- KeyCode::R, KeyCode::U</autogen>
<autogen>--KeyToKey-- KeyCode::E, KeyCode::I</autogen>
<autogen>--KeyToKey-- KeyCode::W, KeyCode::O</autogen>
<autogen>--KeyToKey-- KeyCode::Q, KeyCode::P</autogen>
<autogen>--KeyToKey-- KeyCode::G, KeyCode::H</autogen>
<autogen>--KeyToKey-- KeyCode::F, KeyCode::J</autogen>
<autogen>--KeyToKey-- KeyCode::D, KeyCode::K</autogen>
<autogen>--KeyToKey-- KeyCode::S, KeyCode::L</autogen>
<autogen>--KeyToKey-- KeyCode::A, KeyCode::SEMICOLON</autogen>
<autogen>--KeyToKey-- KeyCode::V, KeyCode::N</autogen>
<autogen>--KeyToKey-- KeyCode::C, KeyCode::M</autogen>
<autogen>--KeyToKey-- KeyCode::X, KeyCode::COMMA</autogen>
<autogen>--KeyToKey-- KeyCode::Z, KeyCode::DOT</autogen>
</item>
<item>
<name>Space to flip keyboard (when type Space only, send Space)</name>
<identifier vk_config="true">remap.keyboard_flip_mode_space</identifier>
<autogen>--ShowStatusMessage-- Space to Flip Keyboard</autogen>
<autogen>--KeyOverlaidModifier-- KeyCode::SPACE, KeyCode::VK_CONFIG_SYNC_KEYDOWNUP_notsave_keyboard_flip_mode, KeyCode::SPACE</autogen>
</item>
<item>
<name>Option x2 to toggle space to flip keyboard</name>
<identifier>remap.space_x2_keyboard_flip_mode</identifier>
<autogen>--DoublePressModifier-- KeyCode::OPTION_R, KeyCode::OPTION_R, KeyCode::VK_CONFIG_TOGGLE_remap_keyboard_flip_mode_space</autogen>
<autogen>--DoublePressModifier-- KeyCode::OPTION_L, KeyCode::OPTION_L, KeyCode::VK_CONFIG_TOGGLE_remap_keyboard_flip_mode_space</autogen>
</item>
</list>
</item>
</root>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment