Skip to content

Instantly share code, notes, and snippets.

@kelchm
Last active February 4, 2016 21:57
Show Gist options
  • Save kelchm/f535432fbae57aff9200 to your computer and use it in GitHub Desktop.
Save kelchm/f535432fbae57aff9200 to your computer and use it in GitHub Desktop.
Emulate Poker II with Karabiner
<?xml version="1.0"?>
<root>
<devicevendordef>
<vendorname>APPLE_COMPUTER</vendorname>
<vendorid>0x05ac</vendorid>
</devicevendordef>
<deviceproductdef>
<productname>INTERNAL_KEYBOARD</productname>
<productid>0x0262</productid>
</deviceproductdef>
<item>
<name>Poker II Emulation</name>
<item>
<name>PokerII WASD Arrow Keys</name>
<appendix>Remap Caps Lock + WASD to arrow keys</appendix>
<identifier>remap.poker2_wasd</identifier>
<block>
<autogen>__KeyToKey__ KeyCode::PC_APPLICATION, KeyCode::OPTION_L</autogen>
</block>
<block>
<device_only>DeviceVendor::APPLE_COMPUTER, DeviceProduct::INTERNAL_KEYBOARD</device_only>
<autogen>__KeyToKey__ KeyCode::PC_APPLICATION, KeyCode::VK_MODIFIER_EXTRA1</autogen>
<autogen>__KeyToKey__ KeyCode::W, ModifierFlag::EXTRA1, KeyCode::CURSOR_UP</autogen>
<autogen>__KeyToKey__ KeyCode::A, ModifierFlag::EXTRA1, KeyCode::CURSOR_LEFT</autogen>
<autogen>__KeyToKey__ KeyCode::S, ModifierFlag::EXTRA1, KeyCode::CURSOR_DOWN</autogen>
<autogen>__KeyToKey__ KeyCode::D, ModifierFlag::EXTRA1, KeyCode::CURSOR_RIGHT</autogen>
<autogen>__KeyToKey__ KeyCode::QUOTE, ModifierFlag::EXTRA1, KeyCode::PAGEUP</autogen>
<autogen>__KeyToKey__ KeyCode::SLASH, ModifierFlag::EXTRA1, KeyCode::PAGEDOWN</autogen>
<autogen>__KeyToKey__ KeyCode::SEMICOLON, ModifierFlag::EXTRA1, KeyCode::HOME</autogen>
<autogen>__KeyToKey__ KeyCode::DOT, ModifierFlag::EXTRA1, KeyCode::END</autogen>
</block>
</item>
</item>
</root>
@kelchm
Copy link
Author

kelchm commented Feb 4, 2016

This gist contains my private.xml which I use with Karabiner. You will also need to use Seil to remap caps lock to keycode 110 (PC_APPLICATION).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment