Q:

Manual shortcut keys without using settings

I want to change the "Close Window" shortcut to Ctrl+Q as this is more intuitive to me than the default Alt+F4. Prior to 12.04 upgrade, I was just able to change this via the settings window, but in 12.04 when I try to set it as Ctrl+Q by pressing the keys for the settings manager to capture, it just closes the window and doesn't set the shortcut.
I have had a look through gconf-editor, but can't seem to find anything. Is there any way to manually set the shortcut key?
Thanks

A:

The reason it doesn't work when trying to set '+q' is because that combination is set for closing System Settings window. I would advise on not changing the keybinding for closing windows to '+q' as it should work for almost every application you open (I tried it on a few applications myself and it worked without me binding the keys to it).
If you still want to change it, I found this command to work the best:
gconftool-2 -s /apps/metacity/window_keybindings/close -t string "<keybinding here>"
For example, if you wish to change the close binding to control+q, then you would do the following:
gconftool-2 -s /apps/metacity/window_keybindings/close -t string "<Control>q"
Go into System Settings >> Keyboard >> Shortcuts and look for the 'Window Close' binding which should now read Ctrl+Q
Hope this helps.

