Where does ubuntu store keyboard shortcut settings?

4

4

I'm having trouble setting a keyboard shortcut in Ubuntu. Trying to use the win (super) key as a modifier, but as soon as I press the win key the keyboard shortcut UI just assumes I wanted to use just that key.

I figure the easiest thing would be to modify the settings file itself, where I should be able to put in whatever I want. But I can't figure out where that's stored. Does anyone know?

Herms

Posted 2010-06-14T17:50:05.417

Reputation: 7 644

http://askubuntu.com/questions/101226/where-does-ubuntu-store-its-keyboard-shortcut-configuration – Ciro Santilli 新疆改造中心法轮功六四事件 – 2016-03-15T10:12:15.810

Answers

5

My settings seem to be stored in Gconf. You can access these in the gconf-editor under /apps/metacity/global_keybindings or /apps/metacity/window_keybindings.

These settings are stored in $HOME/.gconf/apps/metacity/global_keybindings/%gconf.xml and $HOME/.gconf/apps/metacity/window_keybindings/%gconf.xml. If you'll be changing the XML directly, I recommend logging out, making changes in a virtual terminal, and then logging back in.

Sample entries in my gconf-editor (changing them here should take effect immediately):

Default values:
Name                         Value
switch_to_workspace_down     <Ctrl><Alt>Down
switch_to_workspace_up       <Ctrl><Alt>Up

Modified values:
Name                         Value
switch_to_workspace_down     <Mod4>Down
switch_to_workspace_up       <Mod4>Up

Sample entries in my global_keybindings XML:

<gconf>
        <entry name="switch_to_workspace_down" mtime="1274412610" type="string">
                <stringvalue>&lt;Mod4&gt;Down</stringvalue>
        </entry>
        <entry name="switch_to_workspace_up" mtime="1274412607" type="string">
                <stringvalue>&lt;Mod4&gt;Up</stringvalue>
        </entry>
        <entry name="switch_to_workspace_right" mtime="1274412603" type="string">
                <stringvalue>&lt;Mod4&gt;Right</stringvalue>
        </entry>
        <entry name="switch_to_workspace_left" mtime="1274412594" type="string">
                <stringvalue>&lt;Mod4&gt;Left</stringvalue>
        </entry>
</gconf>

p.s. I wonder if your troubles with the settings UI are caused by a specific driver or keyboard layout. You might try setting or tweaking the layout or keyboard model used (System > Preferences > Keyboard, Layouts tab). Also check the Options dialog on the same tab; there are some tweaks for the Alt/Win keys.

quack quixote

Posted 2010-06-14T17:50:05.417

Reputation: 37 382

1That worked perfectly. Just used <Super> to reference the win key. Now to figure out where the setting that makes the mouse scrollwheel change virtual desktops when the mouse is over the desktop is, and kill it. – Herms – 2010-06-14T18:39:17.193

1@herms: i read about that one the other day when i was playing with Compiz settings, but i never noticed it being active on my system. if you've intalled the CompizConfig Settings Manager, check the mouse bindings in there, particularly under the Viewport Switcher or Desktop Wall plugins. – quack quixote – 2010-06-14T19:14:46.473

Didn't realize compiz config had to be installed separately. That would explain why I can't find it. I'll go install that and try it out. Thanks! – Herms – 2010-06-14T19:19:06.113

Do you know what the package name is for the package the compiz config lives under? I'm having trouble finding it. – Herms – 2010-06-14T19:26:32.907

1compizconfig-settings-manager is the package name; it should install a menu item in System > Preferences for it. – quack quixote – 2010-06-14T19:29:27.583

that section of gconf-editor and the xml files don't seem to contain configuration for the "Custom Shortcuts" of Ubuntu (user added commands). Any idea on where those are stored? – Michael Butler – 2012-09-21T15:23:30.247