ref: 57accdce66f2e6f1c6ed26c42b57cdefdec2ed24
osx/private.xml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
<?xml version="1.0"?> <root> <appdef> <appname>CHROME</appname> <equal>com.google.Chrome</equal> </appdef> <list> <item> <name>Google Chrome</name> <list> <item> <identifier>private.chrome_down</identifier> <appendix>Change Control+J to Cursor Down</appendix> <autogen>--KeyToKey-- KeyCode::J, VK_CONTROL, KeyCode::CURSOR_DOWN</autogen> <only>CHROME</only> </item> <item> <identifier>private.chrome_up</identifier> <appendix>Change Control+K to Cursor Up</appendix> <autogen>--KeyToKey-- KeyCode::K, VK_CONTROL, KeyCode::CURSOR_UP</autogen> <only>CHROME</only> </item> </list> </item> <item> <name>Shifts to Parentheses</name> <appendix>Shifts, when pressed alone, type parentheses. When used with other keys they're normal shifts.</appendix> <identifier>private.shifts_to_parens</identifier> <!-- This is the basic mapping. --> <autogen>--KeyOverlaidModifier-- KeyCode::SHIFT_R, ModifierFlag::SHIFT_R | ModifierFlag::NONE, KeyCode::SHIFT_R, KeyCode::KEY_0, ModifierFlag::SHIFT_L</autogen> <autogen>--KeyOverlaidModifier-- KeyCode::SHIFT_L, ModifierFlag::SHIFT_L | ModifierFlag::NONE, KeyCode::SHIFT_L, KeyCode::KEY_9, ModifierFlag::SHIFT_R</autogen> <!-- Remap the "rolls" of () and )( because it's too easy to hit one before finishing the other, and there's no other reason to be pressing both shift keys at once anyway --> <autogen>--KeyToKey-- KeyCode::SHIFT_L, ModifierFlag::SHIFT_R, KeyCode::KEY_0, ModifierFlag::SHIFT_L, KeyCode::KEY_9, ModifierFlag::SHIFT_L</autogen> <autogen>--KeyToKey-- KeyCode::SHIFT_R, ModifierFlag::SHIFT_L, KeyCode::KEY_9, ModifierFlag::SHIFT_L, KeyCode::KEY_0, ModifierFlag::SHIFT_L</autogen> <!-- Remap Rshift+Space to ') ', because when typing an end paren and then a space I tend to hit space before I let go of rshift. --> <autogen>--KeyToKey-- KeyCode::SPACE, ModifierFlag::SHIFT_R, KeyCode::KEY_0, ModifierFlag::SHIFT_L, KeyCode::SPACE</autogen> </item> <item> <name>Remap Left Control to Hyper</name> <appendix>OS X doesn't have a Hyper. This maps Left Control to Control + Shift + Option + Command.</appendix> <identifier>space_cadet.left_control_to_hyper</identifier> <autogen> --KeyToKey-- KeyCode::F19, KeyCode::COMMAND_L, ModifierFlag::OPTION_L | ModifierFlag::SHIFT_L | ModifierFlag::CONTROL_L </autogen> </item> <item> <name>Change fn+s to š</name> <appendix>You need to enable Czech and U.S. input sources.</appendix> <identifier>private.fn_s_to_czech_s</identifier> <autogen>__KeyToKey__ KeyCode::S, ModifierFlag::FN, <!-- change input source to Czech --> KeyCode::VK_CHANGE_INPUTSOURCE_CZECH, <!-- wait until input source was changed --> KeyCode::VK_WAIT_10MS, KeyCode::VK_WAIT_10MS, KeyCode::VK_WAIT_10MS, <!-- put š --> KeyCode::KEY_3, <!-- restore input source --> KeyCode::VK_CHANGE_INPUTSOURCE_US, <!-- suppress key repeating --> Option::NOREPEAT, </autogen> </item> </list> </root> |