2

Is it possible to make Left Alt+A and Right Alt+A do different things? And of course, other modifier keys.

If not, maybe the following idea would work? If AppleScript, Python, Ruby, Perl etc. can detect left/right modifiers I can set complicated key bindings in sublime text (like ["cmd+ctrl+shift+alt+a", "cmd+ctrl+shift+alt+a"]) and send those keystrokes with AppleScript or Automator?

2

You could remap the key combinations with KeyRemap4MacBook:

<?xml version="1.0"?>
<root>
    <appdef>
        <appname>SUBLIMETEXT</appname>
        <equal>com.sublimetext.2</equal>
    </appdef>
    <item>
        <name>test</name>
        <identifier>test</identifier>
        <only>SUBLIMETEXT</only>
        <autogen>__KeyToKey__ KeyCode::A, ModifierFlag::OPTION_R, KeyCode::F19</autogen>
    </item>
</root>

Or just change modifier keys:

<autogen>__KeyToKey__ KeyCode::OPTION_R, KeyCode::CONTROL_L, ModifierFlag::CONTROL_L | ModifierFlag::OPTION_L | ModifierFlag::SHIFT_L | ModifierFlag::COMMAND_L</autogen>

See the source for the key code values and predefined settings.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.