36

I'm trying to figure out why a certain keyboard combination is no longer working.

As an example, Sublime Text 2 ships with a keyboard shortcut for opening the Find/Replace panel:

Command + Option + F

This combo worked fine until I did a clean install of OSX 10.8.5, after which it mysteriously stopped working in Sublime Text.

I know keyboard sequences can be captured by processes other than the frontmost (like by the OS) so I was wondering if there is a way of checking by which process a particular keyboard command was "consumed"?

1

3 Answers 3

36

ShortcutDetective solves your problem. It's free, simple, and to the point.

6
  • 3
    Fantastic recommendation! This did the trick for me.
    – D Raymond
    Apr 5, 2019 at 18:10
  • Thank you!!! This saved me from losing my sanity! Mar 21, 2020 at 23:57
  • 1
    Awesome software, but doesn't seem to work for media keys/shortcuts : [
    – CTS_AE
    May 2, 2020 at 2:16
  • 1
    After migrating my Intel MacBook Pro to a new Apple Silicon (M1 Max) Macbook Pro, ShortcutDetective sometimes crashes for me. Is anyone else experiencing this problem? (I used it so often that I would keep it running on my side monitor, but because of this, not anymore. It's still useful for one-off problems, like the OP's question.) Dec 20, 2021 at 0:32
  • 1
    Yep, I also got a crash on my M1 MacBook Air, but it worked long enough to tell me which app was stealing the keyboard shortcut I was trying to use (it was Logitech Options, and updating it fixed the problem). Dec 27, 2021 at 2:41
22

I don't know any fast and efficient method to find the recipient of a shortcut. But here is a receipe to initiate the hunt:

  1. Close most of your running applications so as to improve the efficiency of the hunt.

  2. Open a Terminal window, and run the following command:

    /usr/bin/sudo opensnoop
    

    This command will track down every open system call.

  3. Switch to the context where your shortcut is intercepted by an unknown application and type ⌘ cmd+⌥ option+F.

    Look for a culprit hint from the file names opened.

  4. while unsuccessfull, add one application, and GOTO 3.

5
  • 1
    Nice! If you do this fast enough, you should have a pretty succinct list of processes. I had about 50 lines, half of which were a background process I knew wasn't listening to keyboard presses so I was easily able to filter those out in a text editor. The remaining 20 or so lines recorded 3 other processes, and 75% of them contained my culprit. Thanks so much for sharing, @daniel Jan 3, 2018 at 17:28
  • 1
    Thanks Daniel. I'd been frustrated for ages that something else was capturing a shortcut meant for one of my applications (and even worse, playing a little ping sound!). ran this, saw maybe 4 apps making calls, one of them was opening "ping.aiff", led me straight to the culprit!
    – Biglig
    Feb 26, 2019 at 10:35
  • I used this method to find that, frustratingly, Logi Tune is capturing CMD+N. Worked perfectly.
    – Aaron
    Sep 21, 2021 at 13:49
  • This worked great, but in macOS 12 it seems that opensnoop isn't working because of System Integrity Protection. Apr 6 at 3:21
  • Do you get an error message or did you read this limitation within man opensnoop?
    – dan
    Apr 9 at 20:47
0

KeyCue provides visual feedback on the keyboard shortcuts. It can be downloaded as a trial version.

KeyCue from Ergonis

I have it configured so that a double tap and hold on the Command key displays all the currently active shortcuts.

2
  • After trying KeyCue, it looks to me like it only shows the keyboard shortcuts associated with menu commands for the current active application. Additionally, it seems to show global hotkeys from Keybaord Maestro and maybe one or two other specific supported applications. Does it show global hotkeys for all applications for you?
    – Paul
    Mar 6, 2017 at 14:32
  • I find it somewhat mysterious as to what hotkeys are shown for 'other' apps. I think it attempts (but doesn't fully succeed) to show global hotkeys that are relevant to where you are. The User Guide specifically refers to Keyboard Maestro.
    – Gilby
    Mar 7, 2017 at 5:56

You must log in to answer this question.

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