18

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

19

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.

| improve this answer | |
  • 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 '19 at 10:35
14

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

| improve this answer | |
  • 1
    Fantastic recommendation! This did the trick for me. – D Raymond Apr 5 '19 at 18:10
  • Thank you!!! This saved me from losing my sanity! – Sanjiv Jivan Mar 21 at 23:57
  • Awesome software, but doesn't seem to work for media keys/shortcuts : [ – CTS_AE May 2 at 2:16
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.

| improve this answer | |
  • 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 .