Thursday, July 5, 2012

Set Keyboard Shortcuts in Gnome 3.*

After a lot of use of Awesome WM, I tried Gnome 3.4 for the first time since a much earlier version of Gnome. I noticed many improvements, especially extensions. However, coming from Awesome I wanted to make it fully usable from the keyboard. Going into the gnome control center did not work, and neither did modifying them from ccsm and using compiz as the window manager. After a bit of searching, I found the answer.

Why it doesn't work:
It turns out that Unity no longer uses the same method of keyboard shortcut definitions that Gnome does. That means that Gnome Control Center sets the shortcuts for Unity, but no longer for Gnome

How to make them work:

Use a program called "Dconf-Editor". Then, go to org > gnome > desktop> wm > keybindings. This is where you can edit the keybindings. The keybindings go inside of the [' s and end with a ']. For instance, closing a window with alt+f4 would look like this: ['<Alt>F4']. Notice that the F is capitalized here. If you use an F1-F12 command, the F is capitalized. More about the semantics in the next section.

Semantics
F1-F12: Capital 'F' followed by number.
Special keys: <Key>, like <Alt> and <Control>. <Control> is spelled out. <Ctrl> will not work.
shift keys: If you use shift in the key combination, the letter with it should be capital.
The Super (Windows logo) button on keyboards is called <Mod4>

Extra
I was worried that binding <Mod4> to anything would invoke the sea of windows. It does not as long as you do not use it by itself. However, whenever all of the windows on a workspace are closed the sea will activate itself.

No comments:

Post a Comment