How can I find which command is bound to a given keyboard shortcut?

How can I find which command is bound to a give keyboard shortcut? I remember playing with my keyboard shortcuts recently in different places: System/Preferences/Keyboard Shortcuts, "gnome-keyboard-properties" and Compiz. Is there a central place where all those shortcuts are kept or do I have to remember all the places where I set a keyboard shortcut?


Solution 1:

No, there's no central place. Any application can grab certain keys and use them as shortcuts, and it's up to that application to choose a configuration method. GNOME applications typically use gconf. Compiz and Metacity even share the gconf keys -- those are the shortcuts you can see in gnome-keybinding-properties.

Solution 2:

The best place I've found is to use gconf. Hit F2 for a run box and type in gconf-editor, then browse to apps > metacity > global_keybindings. You can also set up custom commands in the keybinding_commands section and call them up there. Example: For keybinding command command_1 I put in "gnome-screensaver-command --activate" without the quotes. Then for global keybinding run_command_1 I put in "s" also without quotes. Whenever I use that key command I activate the screensaver.