Skip to content

Instantly share code, notes, and snippets.

@petebarber
Last active January 2, 2016 07:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save petebarber/8269903 to your computer and use it in GitHub Desktop.
Save petebarber/8269903 to your computer and use it in GitHub Desktop.
Custom key mappings for KeyRemap4MacBook to enable PC development on OS X
<?xml version="1.0"?>
<root>
<appdef>
<appname>INTELLIJ</appname>
<equal>com.jetbrains.intellij</equal>
</appdef>
<replacementdef>
<replacementname>MY_IGNORE_APPS</replacementname>
<replacementvalue>VIRTUALMACHINE, TERMINAL, REMOTEDESKTOPCONNECTION, VNC, INTELLIJ</replacementvalue>
</replacementdef>
<replacementdef>
<replacementname>MY_IGNORE_APPS_APPENIDX</replacementname>
<replacementvalue>(Except in Virtual Machine, Terminal, RDC, VNC and IntelliJ)</replacementvalue>
</replacementdef>
<item>
<name>Use PC style alt-TAB for application switching</name>
<appendix>{{ MY_IGNORE_APPS_APPENIDX }}</appendix>
<identifier>private.swap_alt-tab_and_cmd-tab</identifier>
<not>{{ MY_IGNORE_APPS }}</not>
<autogen>__KeyToKey__ KeyCode::TAB, ModifierFlag::OPTION_L, KeyCode::TAB, ModifierFlag::COMMAND_L</autogen>
</item>
<item>
<name>Swap backslash and backquote for British PC keyboard</name>
<identifier>private.swap_backslash_and_quote_for_britishpc</identifier>
<autogen>__KeyToKey__ KeyCode::DANISH_DOLLAR, KeyCode::BACKQUOTE</autogen>
<autogen>__KeyToKey__ KeyCode::BACKQUOTE, KeyCode::DANISH_DOLLAR</autogen>
</item>
<item>
<name>Use PC Ctrl-Home/End to move to top/bottom of document</name>
<appendix>{{ MY_IGNORE_APPS_APPENIDX }}</appendix>
<identifier>private.use_PC_ctrl-home/end</identifier>
<not>{{ MY_IGNORE_APPS }}</not>
<autogen>__KeyToKey__ KeyCode::HOME, ModifierFlag::CONTROL_L, KeyCode::CURSOR_UP, ModifierFlag::COMMAND_L</autogen>
<autogen>__KeyToKey__ KeyCode::HOME, ModifierFlag::CONTROL_R, KeyCode::CURSOR_UP, ModifierFlag::COMMAND_L</autogen>
<autogen>__KeyToKey__ KeyCode::END, ModifierFlag::CONTROL_L, KeyCode::CURSOR_DOWN, ModifierFlag::COMMAND_L</autogen>
<autogen>__KeyToKey__ KeyCode::END, ModifierFlag::CONTROL_R, KeyCode::CURSOR_DOWN, ModifierFlag::COMMAND_L</autogen>
</item>
</root>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment