1

I am trying to change my right command key to be ShiftAlt. This is because it gets annoying to press AltShift8 to get a "{", and i never use the right command any way.

I have been trying to do this using Karabiner, but i have not been able to map one key to multi key (can get the Command_R to be either Alt or Shift), and i can not find any documentation on how to do this. Can any one help me with my settings file to get this to work?

<?xml version="1.0"?>
<root>
    <item>
        <name>Change Right Command Key to Shift Alt</name>
        <identifier>private.right_command_to_shift_alt</identifier>
        <autogen>
            __KeyToKey__ 
            KeyCode::KEY_8, ModifierFlag::COMMAND_R, 
            KeyCode::KEY_8, KeyCode::SHIFT_L, KeyCode::OPTION_L
        </autogen>
        <autogen>
            __KeyToKey__ 
            KeyCode::KEY_9, ModifierFlag::COMMAND_R, 
            KeyCode::KEY_9, KeyCode::SHIFT_L, KeyCode::OPTION_L
        </autogen>
    </item>
</root>
1

There are some errors in your private.xml like SHIFT_L/OPTION_L are no KeyCodes but ModifierFlags. The | to link the 2 modifiers was just guessing (and luck).

Use this xml snippet instead:

<?xml version="1.0"?>
<root>
    <item>
        <name>Change Right Command Key to Shift Alt</name>
        <identifier>private.right_command_to_shift_alt</identifier>
        <autogen>
            __KeyToKey__ 
            KeyCode::KEY_8, ModifierFlag::COMMAND_R, 
            KeyCode::KEY_8, ModifierFlag::SHIFT_L | ModifierFlag::OPTION_L
        </autogen>
        <autogen>
            __KeyToKey__ 
            KeyCode::KEY_9, ModifierFlag::COMMAND_R, 
            KeyCode::KEY_9, ModifierFlag::SHIFT_L | ModifierFlag::OPTION_L
        </autogen>
    </item>
</root>

Tested with a german keyboard, danish keyboard layout, Mac OS X 10.7 and KeyRemap4MacBook:

{}{}{}{} :-}

Please don't forget to reload the xml in the Change Key tab in Karabiner/KeyRemap4MacBook (that's the same but different named app for Mac OS X < 10.9) after applying the changes in the private.xml.

  • Sadly this do not work, it will only hold down the shift key – Androme Mar 31 '15 at 13:31
  • @DoomStone Strange, I*m just writing this with a danish kezboard lazout (check all mz errrors!) : {} {with the changes adapted in the private.xml but using KezRemap4MacBook} – klanomath Mar 31 '15 at 13:35
  • @DoomStone This also works with a german kb layout with respective different chars: ˜· – klanomath Mar 31 '15 at 13:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .