2

When I press Esc in Safari, it exits from full-screen mode.

There is another shortcut for that: CTRL-CMD-F and I'd rather keep only that one active.

Is it possible to disable the Esc keybinding?

I've looked at the Keyboard shortcuts and gestures in Safari on Mac page on the Safari User Guide. It says

To turn off or change keyboard shortcuts, see Create keyboard shortcuts for apps. [A page on macOS user guide]

But the Create keyboard shortcuts for apps page explains how to add a keyboard shortcut in the macOS settings section Apple menu > System Preferences > Keyboard > Shortcuts > App Shortcuts. Obviously, I could remove a setting if it was listed there, but the default settings are not available.

I thought of binding the Esc key with an undefined menu item, but in some contexts that keybinding executes actions that I'd keep configured as they are, ideally.

In particular, it will perform the following (as presented in the Safari User Guide):

  • "While typing in the Smart Search field, restore the current web page address"
  • "Close Reader"
  • "Cancel editing a bookmark name in the sidebar"

I've also tried inspecting the situation with CheatSheet. The app is really cool, it displays (almost) all the keyboard shortcuts for an app and allows to edit them via another app (not tested), but the "Esc" is not on the list so I guess it also can not be edited.

acorello
  • 153
  • No, they suggest to intercept and remap Esc using dedicated system utilities. But I don't want to disable it completely because the Esc is also used to "While typing in the Smart Search field (to) restore the current web page address" and + Esc does not work in that case. – acorello Dec 22 '20 at 21:36
  • Have you tried the first solution? – twlscnds Dec 23 '20 at 04:20
  • @TwlvSeconds yes. The first solution suggests two things. 1) bind the "Exit Full Screen" action to a different keybinding 2) promotes a paid, closed-source, software called "Keyboard Maestro" to "do the same thing". I used the trial version just to see how it looked but was too complex, anyway it makes no logical sense. Please, read again my comment. I want to unbind Esc => Exit Full Screen and nothing else. On the bright side, I stumbled on a great open-source alternative to "Keyboard Maestro" called Karabiner-Elements, I love it! – acorello Dec 23 '20 at 19:55
  • @protoboolean how did you do it with Karabiner-Elements? – Evan Hammer Oct 29 '21 at 13:42
  • @EvanHammer I'm not 100% sure and since then I switched to Linux Fedora as my daily driver, wiping the MacOS clean; so I can't check the Karabiner-Elements config. I reckon that I associated Esc to Shift+Esc for the Safari app only. Adding a modifier to Esc worked as a by-pass to the default action. Check the official docs for the details. – acorello Nov 11 '21 at 16:04

0 Answers0