What are all possible ways a keyboard shortcut could be bound in Safari

alfredkeyboardsafarishortcut

What are all of the ways a keyboard shortcut could be bound in Safari?

I am aware of the following:

  • The app’s own standard shortcuts
  • System Preferences > Keyboard > Shortcuts >
    • App Shortcuts >
      • All Applications
      • Safari
    • Services
  • Safari Extensions
  • KeyBindings.dict
  • 3rd party utility applications
    • Alfred
    • FastScripts
    • Keyboard Maestro

Are there other obvious paths I could be missing? Are there ways of figuring out how a specific keybinding is being handled?

For context, I created a utility shortcut for myself to send the current Safari tab to Chrome by pressing ^c. I did this a few years ago with an Alfred Workflow, with a Hotkey trigger scoped to com.apple.safari and a simple AppleScript to get and reopen the front tab's URL.

Great. However, changing the keybinding of this workflow today I discovered that it also seems to be captured by something else I set up at some point (and bound to basically the same action). With the Alfred workflow disabled, its keybinding changed, or Alfred itself quit and not running, I have verified that the Alfred version does not run, but something else is triggering the page to open in Chrome.

I do not have FastScripts or Keyboard Maestro on this Mac. I do not see any bindings for this key in the System Preferences. I do not have /Library/KeyBindings/ or ~/Library/KeyBindings/ folders on this Mac. I don’t see any bindings in any of the areas of the Keyboard > Shortcuts preference pane. There don’t seem to be any plausibly-related Safari Extensions installed.

Shortcut Detective can detect when Alfred catches a keybinding from Safari, but sees nothing when the still-caught ^c is handled by whatever else is grabbing it.

I can’t for the life of me figure out where else I managed to bind this shortcut, and therefore can’t figure out how to unbind it short of wiping my account.

Best Answer

I've run across this post on StackOverflow that addresses this. Basically, there's no central repository of all the shortcuts created because, in the end, the application isn't required to register the event with the system.

However, they did recommend an application (KeyCue from Ergonis, €19; Free Trial) that has the ability to find all of the shortcuts that are assigned to an application (i.e. Firefox). I downloaded and tested the application and it seems promising.

(Thanks to user Nimesh Neema - see comments below), you can also use CheatSheet ($0; free as in beer). Both work in the same manner with roughly the same output (KeyCue is shown below).

Holding down the ⌘ Command key for a couple of seconds brings up an overlay showing all of the keyboard shortcuts that are assigned to the "front most" App - in this case, Firefox.

enter image description here

If you're searching for a particular shortcut you'll have to go through each running app manually to find it. So, as stated in the SO answer, while not perfect, this will get you close to what you're looking for.