Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

How can I assign command (apple) + shift or option (alt) + shift as a shortcut? It seems that I can assign other keyboard combinations but not this one as a shortcut.

share|improve this question

3 Answers 3

You can use KeyRemap4MacBook. This inserts Q when releasing shift:

<autogen>__KeyOverlaidModifier__ KeyCode::SHIFT_L, ModifierFlag::OPTION_L | ModifierFlag::SHIFT_L | ModifierFlag::NONE, KeyCode::SHIFT_L, ModifierFlag::OPTION_L, KeyCode::Q</autogen>
<autogen>__KeyOverlaidModifier__ KeyCode::SHIFT_R, ModifierFlag::OPTION_R | ModifierFlag::SHIFT_R | ModifierFlag::NONE, KeyCode::SHIFT_R, ModifierFlag::OPTION_R, KeyCode::Q</autogen>

This inserts Q when pressing shift, but it requires pressing shift before option for shortcuts like ⌥⇧[:

<autogen>__KeyToKey__ KeyCode::SHIFT_L | ModifierFlag::SHIFT_L | ModifierFlag::OPTION_L | ModifierFlag::NONE, KeyCode::Q</autogen>
<autogen>__KeyToKey__ KeyCode::SHIFT_R | ModifierFlag::SHIFT_R | ModifierFlag::OPTION_R | ModifierFlag::NONE, KeyCode::Q</autogen>

This remaps pressing option and shift simultaneously:

<autogen>__SimultaneousKeyPresses__ KeyCode::OPTION_L, KeyCode::SHIFT_L, KeyCode::Q</autogen>
<autogen>__SimultaneousKeyPresses__ KeyCode::OPTION_R, KeyCode::SHIFT_R, KeyCode::Q</autogen>

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

share|improve this answer

I don't think it is possible. Those are called modifier keys and you can't only use them in shortcut, because the system wouldn't know whether it should interpret ⌘⇧ or wait you add another key like S to interpret ⌘⇧S. That's why you can't use only modifier keys in keyboard shortcuts.

However, some software (like Alfred) allows you to use a fast double press on a modifier key as a shortcut. Apple uses this trick as well since Mountain Lion with the fn key in order to activate voice dictation.

share|improve this answer

I would hesitate to do this. What would happen if, say, you press Command-[any key], and press the Command key just a few milliseconds before the other? Would the OS interpret that as a Command-key press and perform an action? Most likely, the inability to set these keys as shortcuts on their own is for that reason.

share|improve this answer

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.