If you use shortcut apps (e.g. Alfred, BetterTouchTool, Keyboard Maestro) you’ll probably know the issue that a shortcut you’ve just set doesn’t produce the desired result because you’ve set this shortcut already in another shortcut app or an app uses it without your knowledge.
I ran into this quite often but found a nice little helper: ShortcutDetective.app
If a shortcut doesn’t behave as expected launch ShortcutDetective, activate the app in question, hit the shortcut you want to investigate and ShortcutDetective will tell you which app received it.
It’s free from Irradiated Software’s Irradiated Labs. There are other interesting apps, I like FinderMinder a lot too.
Talking about shortcuts here’s a script that makes troubleshooting even simpler.
-- Launch ShortcutDetective.app and activate last app or quit ShortcutDetective.app
tell application "System Events"
set theProcesses to name of every process
end tell
if theProcesses contains "ShortcutDetective" then
tell application "ShortcutDetective" to quit
else
tell application "System Events" to set activeApp to name of first application process whose frontmost is true
tell application "ShortcutDetective" to activate
activate application activeApp
end if
Thanks. Been hunting for an app that locates shortcut conflicts.
I’m doing something wrong though. E.g., in Safari I launch ShortCutDetective and press ⌘P, all ShortCutDetective does is show the spinning wheel endlessly. I’ve granted the app Accessibility privileges as it requested, but ShortCutDetective seems to do nothing.
Hmm, asked the developer. Here’s what he answered:
There are a few reasons ShortcutDetective (SD) might not be working for them.
From the forum post, it doesn’t sound like korm is using SD
correctly. SD needs to be the focused app when pressing the keyboard
shortcut. SD only detects globally registered keyboard shortcuts, so
per korm’s usage, pressing ⌘P would not show up in SD because that’s a
local shortcuts found in Safari’s File menu. An example of a global
shortcuts is ⌘Space to show Spotlight, which can be invoked no matter
which app is running.
Starting in macOS 10.15 Catalina, Apple has added a new “Input
Monitoring” permission for apps, such as SD, that listen to keyboard
events. When SD first launches, macOS will pop up a scary looking
warning dialog saying, “ShortcutDetective would like to receive
keystrokes from any application.” If the user clicks the “Deny”
button, SD will not work at all, and worse, SD can’t detect that it
doesn’t have permission, so SD will continue to not work without
manual intervention.
To enable this “Input Monitoring” permission:
a) Open System Preferences > Security & Privacy > Privacy Tab
b) Choose “Input Monitoring” from the list on the left
c) Click the lock icon in the lower left to make changes (you will be
prompted to enter an Administrator’s password).
c) Check the box next to ShortcutDetective
Another reason SD might fail is if an app isn’t using the standard
method to register a keyboard shortcut, but is instead using an
EventTap to capture and filter keyboard events. This is an advanced
topic that would be hard to describe fully, but as a point of
interest, SD actually uses an EventTap to do the magic of determining
which app is snarfing a global keyboard shortcut.
Didn’t know that ShortcutDetective has to be the focused app - otherwise I wouldn’t have written the AppleScript… but it always works over here.
I’m still on Mojave 10.14.5, maybe that’s the difference?
I was using it correctly, but the app does not offer help. It’s not clear from the app that it is looking for “globally registered” shortcuts.
SD appears to look at only shortcuts defined in System Preferences > Keyboard for services and apps. Most of my shortcut conflicts are due to shortcuts in use by Keyboard Maestro macros, Typinator, and activation shortcuts configured inside individual apps. So, SD is interesting but has a very narrow use case.
From the developers answer I first thought that too - but I use it for conflicts between shortcut apps.
Use it for some months now, and also have the AppleScript assigned to my mouse, everything’s working fine. E.g. when I press CTRL + P in Safari (to create a PDF to a specific DEVONthink group) ShortcutDetective shows me that it’s set up in Keyboard Maestro