Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to map

Shift+Esc to Esc Esc Esc

on my MacBook Pro.

I have tried Better Touch Tool. It can remap one key combination to another, but not to a sequence of keystrokes.

share|improve this question

Within what application do you want this binding? I'm guessing Terminal or iTerm.

For iTerm, you can select Preferences > Keys then add a global shortcut to the action you want.

For Terminal it's similar. Preferences > Keyboard but you'll have to know the keystroke sequence in hex (I believe ESC is 0x35)

The other way to set shortcuts is in System Preferences > Keyboard > App Shortcuts. This is the easy way to map a menu option but may not be appropriate for your use case.

share|improve this answer
I am looking for a general solution, i.e. for any application. – qed Jul 26 '14 at 9:46

For a general solution you'll want to use Karabiner. It'll let you remap things for all your applications and it comes with tons of options as well as the ability to customize and create your own mappings if you want. Check out this answer for an example of how to go about creating new mappings or check out their (fairly friendly) documentation here.

share|improve this answer

Your Answer


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.