The question "How to disable Escape key in Safari" was asked here a few times. Now since on the new MacBook Pros the Escape key is a touchscreen button, it is much easier to press it accidentally, but there is a good chance we can actually remove it in Safari once and for all.

How to remove Escape button from TouchBar in Safari? (or any specific app)

There is no such option in Customize Touch Bar... menu: Customize Touch Bar Menu

  • You could try removing it using the Touch Bar API. May 22, 2017 at 4:15
  • @haykam Where can we find details about the Touch Bar API you mentioned? I want to try this.
    – Vladimir
    Nov 4, 2018 at 17:24

6 Answers 6


You can use Karabiner-Elements [1, 2] to map escape key to some other functions with visual feedback (e.g. mute). The feedback helps to remind you that the key is not longer mapped to escape.

You can then map a less useful key to escape. For e.g. on a US keyboard, the section (§/±) key is on the top-left corner where escape key could have been.

  1. Install and run Karabiner-Elements.
  2. In Simple Modifications, choose No product name (No manufacturer name) as Target. That's the touchbar. Then add item, from escape to mute. enter image description here

  3. To map section (§/±) key to escape, choose Apple Internal Keyboard. Add item, from non_us_backslash to escape. enter image description here


  • This is great, thank you! I decided to map the Escape on the touchbar to the fn button which is really nice as it does nothing but also give you a visual indicator that you pressed something and provides a nice shortcut to change the other touchbar buttons back to F keys
    – BlueC
    Jun 27, 2019 at 13:34
  • I found that mapping escape to left_shift on the Touchbar is a better and silent alternative, as I find no value in being reminded to adjust my hands posture. Also note that to be able to select No product name, it must first be enabled in the Devices tab. Mar 26, 2020 at 23:29

Try using BetterTouchTool,

click on the 'Keyboard' tab ('Select Application' should be set to 'Global'), click on '+ Add New Shortcut or Key Sequence' click on the field and press the 'Shift-Escape' keys, a ⇧⎋ should appear move to the right where it says 'Trigger Predefined Action' and choose: 'Keyboard keys/ESC (Escape key, respects pressed modifier)'

We've just created a substitute for the 'escape' key. Now we need to disable it.

click on '+ Add New Shortcut or Key Sequence' click on the field and press the 'Escape' key on the Touchbar, a ⎋ should appear move to the right where it says 'Trigger Predefined Action' and make sure it reads: No Action

I like this way more than deactivating the entire TouchBar.


There's a brilliant application called BetterTouchTool that allows you to modify the touch bar. I've been able to move the escape key slightly inward using it. BTT is a paid app, but licenses aren't very expensive and they offer some discounts (e.g. student) from time to time. Here's the link.

Touch Bar with Escape button shifted right

  • Cool! Here's more on how to do it. github.com/fifafu/BetterTouchTool/issues/204 You basically have to renounce any app-specific use of the touch bar, then create your own escape key and place it on the bar. Crazy, but if it saves me from these constant escape hitting shocks, great.
    – Urs
    Jul 25, 2017 at 13:35
  • I first added a modifier key to the new ESC key, so it only appears when I press cmd. No, better: Add something to the left, like the date widget. Now that's even useful!
    – Urs
    Jul 25, 2017 at 13:43
  • Here are some more hints: remove ESC entirely and remap it to the keyboard youtube.com/watch?v=gsRTtO-8ofM
    – Urs
    Jul 25, 2017 at 23:15

To avoid accidentally pressing Esc, use Karabiner-elements to remap the Escape action to shit+Esc. But use the 'complex modification' options instead of the simple ones suggested elsewhere.

Install Karabiner -> Complex modifications -> 'Add rule' -> 'Import more rules' -> search 'escape' -> Import 'Change escape key (rev 4)' -> Enable only this: 'Disable escape(...)'

Ready, to make an Esc you now have to press shift+Esc


You can't remove it, it's permanent (unless viewing expanded touch bar view).


Download the latest Karabiner-Elements desktop application.


  1. From Devices section, choose the option No product name.

enter image description here

  1. Now go to the simple modifications section, choose the Target device as no product name. Now map the escape key to your desired key. (For example: left option, capslock, etc).

enter image description here

You must log in to answer this question.

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