Chapter 5. Key Bindings

Table of Contents
The Keygrabber
Key Names
Actions

The Keygrabber

The keygrabber works very similarly to bbkeys, which is an excellent tool but had some limitations (and was license incompatible), but with a totally new syntax for the config file, and a couple of new features which makes Fluxbox even more powerful.

For one, the new keygrabber supports chains of key sequences (like emacs)... so you could for example have: Mod1 + M + Mod1 + F to switch to the next workspace (not that anyone would actually use that particular key sequence.)

And if you've typed in a part of the sequence but decide not to continue (abort) then you can hit another key sequence (that you configured in your keys file) to simply abort (with: AbortChain).

In addition to this you can also bind a key sequence to switch between grouped/tabbed windows in a group (with: NextTab and PrevTab).

It is possible to execute more than one command with one keybinding. The commands will be executed parallel.

Example 5-1. macro command

    Mod4 Shift x :MacroCmd { ExecCommand xterm } { ExecCommand gv 1.ps }

Finally, for your convenience we (or rather vlaad and tarzeau) have supplied you with two scripts (they both do the same thing) to convert a bbkeys conf-file to a Fluxbox keys-file. (usage of the scripts is described in them). Download: convertkeys or convertkeys2.

Example 5-2. A Fluxbox keysfile

    Mod1 Tab :NextWindow
    Mod1 F1 :Workspace 1
    Mod1 F2 :Workspace 2
    Mod1 F3 :Workspace 3
    Mod1 F4 :Workspace 4
    Control n Mod1 n :NextTab

So, as you can see, First there is a modifier, then a key (then a modifier and key again if you wish to have a longer sequence) and finally a colon with an action.

For a list of valid keys actions read a little further down in this document.

And why this is good for you? Well, now you can master your xmms, for example:

Example 5-3. XMMS keybindings

    Mod1 P :ExecCommand xmms -p
    Mod1 F :ExecCommand xmms -f

If you have some additional keys (e.g multimedia keys), you can control xmms this way if you have configured those keys properly in XFree86:

Example 5-4. Multimedia keys for XMMS

    None XF86AudioPlay :ExecCommand xmms -u
    None XF86AudioStop :ExecCommand xmms -s

I would say check xmms --help for more info, but you are doing this right now probably...