Skip to content

Instantly share code, notes, and snippets.

@takeo takeo/gist:14
Created Jul 17, 2008

Embed
What would you like to do?
the most beautiful code in the world
--- /Users/ioio/Downloads/KeyRemap4MacBook-6.99.0/files/prefpane/include/simultaneouskeypresses_vimode.xml 2010-11-12 18:21:47.000000000 +0100
+++ /Users/ioio/Downloads/KeyRemap4MacBook-6.9.69/files/prefpane/include/simultaneouskeypresses_vimode.xml 2010-11-14 20:43:08.000000000 +0100
@@ -8,7 +8,8 @@
<appendix>Push S and D keys simultaneously and keep them pressing.</appendix>
<appendix>Then you can use Vi style navigation by HJKL.</appendix>
<appendix>- HJKL to Left/Down/Up/Right</appendix>
- <sysctl vk_config="true">notsave.simultaneouskeypresses_vimode</sysctl>
+ <sysctl>notsave.simultaneouskeypresses_vimode</sysctl>
+ <vk_config>true</vk_config>
<autogen>--ShowStatusMessage-- Vi Mode</autogen>
<block>
<config_only>option.pointing_relative_to_scroll_vi_mode</config_only>
@@ -24,6 +25,27 @@
<autogen>--KeyToKey-- KeyCode::O, ModifierFlag::EXTRA4, KeyCode::Z, ModifierFlag::SHIFT_L | ModifierFlag::COMMAND_L</autogen>
</block>
<block>
+ <config_only>option.simultaneouskeypresses_vimode_g_to_history</config_only>
+ <autogen>--KeyOverlaidModifier-- KeyCode::G, KeyCode::VK_MODIFIER_EXTRA5, KeyCode::H, ModifierFlag::COMMAND_L | ModifierFlag::OPTION_L</autogen>
+ <autogen>--KeyToKey-- KeyCode::J, ModifierFlag::EXTRA5, KeyCode::CURSOR_LEFT, ModifierFlag::CONTROL_L | ModifierFlag::OPTION_L | ModifierFlag::COMMAND_L</autogen>
+ <autogen>--KeyToKey-- KeyCode::L, ModifierFlag::EXTRA5, KeyCode::CURSOR_RIGHT, ModifierFlag::CONTROL_L | ModifierFlag::OPTION_L | ModifierFlag::COMMAND_L</autogen>
+ <autogen>--KeyToKey-- KeyCode::I, ModifierFlag::EXTRA5, KeyCode::Z, ModifierFlag::CONTROL_L | ModifierFlag::COMMAND_L</autogen>
+ <autogen>--KeyToKey-- KeyCode::U, ModifierFlag::EXTRA5, KeyCode::Z, ModifierFlag::COMMAND_L</autogen>
+ <autogen>--KeyToKey-- KeyCode::O, ModifierFlag::EXTRA5, KeyCode::Z, ModifierFlag::SHIFT_L | ModifierFlag::COMMAND_L</autogen>
+ </block>
+ <block>
+ <autogen>--KeyOverlaidModifier-- KeyCode::D, KeyCode::OPTION_L, KeyCode::C, ModifierFlag::COMMAND_L</autogen>
+ <config_only>option.simultaneouskeypresses_vimode_d_to_option</config_only>
+ </block>
+ <block>
+ <autogen>--KeyOverlaidModifier-- KeyCode::S, KeyCode::CONTROL_L, KeyCode::X, ModifierFlag::COMMAND_L</autogen>
+ <autogen>--KeyToKey-- KeyCode::J, ModifierFlag::CONTROL_L | ModifierFlag::OPTION_L, KeyCode::TAB, ModifierFlag::SHIFT_L</autogen>
+ <autogen>--KeyToKey-- KeyCode::L, ModifierFlag::CONTROL_L | ModifierFlag::OPTION_L, KeyCode::TAB</autogen>
+ <autogen>--KeyToKey-- KeyCode::J, ModifierFlag::CONTROL_L, KeyCode::SPACE, KeyCode::CURSOR_LEFT</autogen>
+ <autogen>--KeyToKey-- KeyCode::L, ModifierFlag::CONTROL_L, KeyCode::SPACE</autogen>
+ <config_only>option.simultaneouskeypresses_vimode_s_to_control</config_only>
+ </block>
+ <block>
<config_only>option.simultaneouskeypresses_vimode_d_to_deletemode</config_only>
<autogen>--KeyToKey-- KeyCode::D, KeyCode::VK_MODIFIER_EXTRA1</autogen>
<block>
@@ -91,7 +113,7 @@
</block>
<block>
<config_only>option.simultaneouskeypresses_vimode_tab_to_managemode</config_only>
- <autogen>--KeyOverlaidModifier-- KeyCode::TAB, KeyCode::COMMAND_L, ModifierFlag::EXTRA2, KeyCode::TAB, ModifierFlag::OPTION_L, KeyCode::RETURN</autogen>
+ <autogen>--KeyOverlaidModifier-- KeyCode::TAB, KeyCode::COMMAND_L, ModifierFlag::EXTRA2, KeyCode::TAB, ModifierFlag::OPTION_L, KeyCode::SHIFT_L</autogen>
<block>
<config_not>option.simultaneouskeypresses_vimode_jkli</config_not>
<autogen>--KeyToKey-- KeyCode::H, ModifierFlag::EXTRA2, KeyCode::TAB, ModifierFlag::SHIFT_L</autogen>
@@ -188,10 +210,6 @@
<autogen>--KeyToKey-- KeyCode::QUOTE, KeyCode::Z, ModifierFlag::COMMAND_L | ModifierFlag::SHIFT_L</autogen>
</block>
<block>
- <autogen>--KeyOverlaidModifier-- KeyCode::S, KeyCode::CONTROL_L, KeyCode::X, ModifierFlag::COMMAND_L</autogen>
- <config_only>option.simultaneouskeypresses_vimode_s_to_control</config_only>
- </block>
- <block>
<config_only>option.simultaneouskeypresses_vimode_uo_to_backspacedelete</config_only>
<autogen>--KeyToKey-- KeyCode::U, ModifierFlag::CONTROL_L, KeyCode::Z, ModifierFlag::COMMAND_L</autogen>
<autogen>--KeyToKey-- KeyCode::O, ModifierFlag::CONTROL_L, KeyCode::Z, ModifierFlag::COMMAND_L | ModifierFlag::SHIFT_L</autogen>
@@ -272,10 +290,6 @@
<config_only>option.simultaneouskeypresses_vimode_a_to_shift_select</config_only>
</block>
<block>
- <autogen>--KeyOverlaidModifier-- KeyCode::D, KeyCode::OPTION_L, KeyCode::C, ModifierFlag::COMMAND_L</autogen>
- <config_only>option.simultaneouskeypresses_vimode_d_to_option</config_only>
- </block>
- <block>
<config_only>option.simultaneouskeypresses_vimode_f_to_command</config_only>
<autogen>--KeyOverlaidModifier-- KeyCode::F, KeyCode::COMMAND_L, ModifierFlag::EXTRA3, KeyCode::V, ModifierFlag::COMMAND_L</autogen>
<block>
@@ -410,6 +424,10 @@
<config_only>option.simultaneouskeypresses_vimode_g_to_command_f</config_only>
</block>
<block>
+ <autogen>--KeyToKey-- KeyCode::E, KeyCode::F, ModifierFlag::COMMAND_L</autogen>
+ <config_only>option.simultaneouskeypresses_vimode_e_to_command_f</config_only>
+ </block>
+ <block>
<autogen>--KeyToKey-- KeyCode::SEMICOLON, KeyCode::SPACE</autogen>
<config_only>option.simultaneouskeypresses_vimode_semicolon_to_space</config_only>
</block>
@@ -695,6 +713,8 @@
<item>
<name>[Option] S to Control</name>
<appendix>(+ When you press S only send Command+X)</appendix>
+ <appendix>(+ When you press left with S pressed, send spaceback)</appendix>
+ <appendix>(+ When you press right with S pressed, send space)</appendix>
<sysctl>option.simultaneouskeypresses_vimode_s_to_control</sysctl>
</item>
<item>
@@ -831,6 +851,10 @@
<sysctl>option.simultaneouskeypresses_vimode_g_to_command_f</sysctl>
</item>
<item>
+ <name>[Option] E to Command+F</name>
+ <sysctl>option.simultaneouskeypresses_vimode_e_to_command_f</sysctl>
+ </item>
+ <item>
<name>[Option] Semicolon(;) to Space</name>
<sysctl>option.simultaneouskeypresses_vimode_semicolon_to_space</sysctl>
</item>
@@ -866,5 +890,9 @@
<name>[Option] E to History Mode</name>
<sysctl>option.simultaneouskeypresses_vimode_e_to_history</sysctl>
</item>
+ <item>
+ <name>[Option] G to History Mode</name>
+ <sysctl>option.simultaneouskeypresses_vimode_g_to_history</sysctl>
+ </item>
</list>
</item>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.