Ubuntu – How to find *why* I can’t bind some keyboard shortcut (or which app took it)

compizkeyboardshortcut-keysshortcutsunity

In short: is there (under Unity) any way to find out which application grabbed some global shortcut? I do not ask for "standard shortcuts" but for some way to get information about actual shortcuts (which app is actually keeping given key just now in my current config)

Longer story:

I have repeatable problems with managing keyboard shortcuts. At the moment:

  • Synapse sometimes (*) can't bind Win-Space as it's activation shortcut, reporting "Failed to register hotkey 'activate' with signature 'space'" (what usually means that this shortcut is already taken)

    (*) After one login it works, after another login it does not. I suspect some race between two apps…

  • F9 for some reason makes my screen slightly darker (and F9 does not reach application-level shortcuts so for example my byobu menu does not work)

I tried looking at various places, and:

  • I do not see any of those shortcuts in Keyboard settings/Shortcuts

  • I can't find them in gconf-editor (I tried searching for F9 in values in particular, nothing found)

  • I could not find them in dconf-editor (there is no search so I clicked some most obvious paths)

So my question is: is there any way to ask unity/dconf/gconf/d-bus/whatever about current global hotkeys allocation (which process is keeping which key). Or force logging those allocations to some log file. Or grep them from somewhere. Or………

Best Answer

Between 12.10 and 17.04 the Ubuntu desktop is actually Compiz and Unity itself is just a Compiz plugin.

If you, instead, set and enable the Compiz "commands" plugin and set keyboard shortcuts using CCSS where there is a conflict, CCSM should alert you to what plugin is causing the conflict and should also provide options to disable the conflicting plugin or conflicting keybinding before applying your settings.

Personally, I've also experienced difficulty setting keyboard shortcuts in 14.04+ but ever since I decided to start using the CCSM plugin instead of the keyboard shortcut settings in Unity, I have not experienced any issues whatsoever and all my shortcuts work just fine and so strongly suggest you at least check it out as an option.

Related Question