Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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