13

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"?

  • 2
    I would start with looking at System Preferences -> Keyboard -> Keyboard shortcuts. Try to add new shortcut there with Cmd + Option + f, if it has been associated with other action, you'll see a warning – number5 Oct 3 '13 at 0:59
  • 1
    No warning when assigning Cmd + Option + f to Launchpad - works fine – Mark Fox Oct 4 '13 at 19:00
  • What model Mac are you running with what keyboard? I've often found that applications looking for non-standard keyboard shortcuts like to have the function key pressed too, though if this just stopped happening it's likely not your issue. – agentroadkill Mar 16 '15 at 21:14
  • Have you reset your NVRAM, or your SMC? Any issues with your permissions? Resetting them via Disk Utility might work. Also, reinstalling the latest version of Sublime Text and/or OS X may work (last resort). – NetOperator Wibby Mar 16 '15 at 21:58
  • While this very well might solve the specific problem with the shortcut in sublime, it holds little worth as an answer to the more general problem of locating which process consumed a given shortcut. – 0sh Mar 16 '15 at 22:20
15

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.

  • 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 – Joel Mellon Jan 3 '18 at 17:28
  • 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 at 10:35
6

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

  • Fantastic recommendation! This did the trick for me. – D Raymond Apr 5 at 18:10
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.

  • 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 '17 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 '17 at 5:56

You must log in to answer this question.

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