How to search through all keyboard shortcuts that use a certain key?

I sometimes set keyboard shortcuts, but as there are so many keyboard shortcuts set on my system, it is hard to know what other keyboard shortcuts you might set off when setting and using a new one, so it would be really useful if there was a way (preferably through Terminal) in order to view all the keyboard shortcuts on the system that have a certain key, a certain order of certain keys, or a certain set of keys (but having it not matter which order they have in, just searching through shortcuts with those keys in them).

There will either be a utility already in existence which will allow me to do this, if so, please recommend it, however, if not, then a script or command would also be acceptable and possibly more likely as I haven't seen anything like this around. I am running Ubuntu GNOME 15.10 with GNOME 3.18.


Solution 1:

You can view the set keyboard shortcuts for Unity and Gnome through

gsettings list-recursively | awk '/hotkey/||/keybinding/||/media-key/' | less

and

dconf dump / | awk '/keybindings/ || /media-keys/{print; getline; print }'

I suggest you play around with those commands, try filtering out the output in different ways, but in short it's all in gsettings and dconf