b5media.com

Advertise with us

Enjoying this blog? Check out the rest of the Technology Channel Subscribe to this Feed

New Linux User

HOWTO: Map Keys (to bring up the “Run” dialogue) in Fluxbox?

by Jon on October 27th, 2005


One of the things that threw me right away with Fluxbox is that some of the shortcuts I had become accustomed to in KDE didn’t work. Most notably, ALT+F4 brought me to the fourth desktop rather than closing the active window and ALT-F2 brought me to the second desktop instead of opening a run dialogue window.

I still haven’t figured out how to map ALT+F4 to close the active window, but I did figure out where this mapping takes place.

In your ~/.fluxbox directory there is a file named keys. Open it up in your favrouite text editor and it will look something like the one displayed above. This one has been modified to bring up the run dialogue when I hit ALT+F2. The command I want is fbrun (FluxBox Run, perhaps?)

By default, the Mod F2 line will have the command to bring me to the third desktop, Workplace 3. Change it to read:

ExecCommand fbrun

and ALT+F2 will now bring up the fbrun dialogue rather than the moving you to desktop 3.

POSTED IN: How To

5 opinions for HOWTO: Map Keys (to bring up the “Run” dialogue) in Fluxbox?

  • Geoff
    Oct 27, 2005 at 8:38 am

    To make Alt + F4 close the current window, add the following to ~/.fluxbox:

    Mod1 4 :Close

    Fluxbox comes with a very weak set of default keysets. It enables a user to switch windows and desktops, and no more. Before changing it, there are a few things necessary to know. In the Fluxbox keys file, there are some strange modifiers. Mod1 is commonly known as the “Alt” key, and Mod4 is the unspeakable (windows) key. Control and Shift are Control and Shift. However, it is usually best to use Alt/Windows keys because other X11 programs tend to use Control and Shift for their own shortcuts.

    Fluxbox Keys

    Looking at their example and then yours, I’m thinking they probably made a typo (should be f4 instead of just 4 — although maybe they really wanted to say Alt + 4). I’ll let you see which works (I won’t be able to install it until later tonight).

  • Geoff
    Oct 27, 2005 at 8:43 am

    Here’s an even better source of key binding know-how — straight from the developers themselves!

    Fluxbox key bindings

  • Jon
    Oct 27, 2005 at 8:50 am

    Aha! Wicked, Geoof - thanks for the links. I’ve added both of them to my Linux de.lirio.us tags which means they’ll be available for the GNU/Linux show listeners.

    This is great…I’ve been playing with Fluxbox each day and getting it a little more functional for me. I had no idea the key binding could do so much.

    New toy!!

  • Hari
    Jan 3, 2006 at 5:52 pm

    no, it was supposed to be 4 not F4, this is not windows… you wouldn’t want to change predefined behaviour cos you’d be lost when you came to another flux…

  • Jon
    Jan 3, 2006 at 6:00 pm

    Hari: What? I don’t understand what you’re saying…

    My screenshot shows that Mod1 F2 will bring up fbrun (which is does..or did, I don’t run Fluxbox anymore). Therefore, Mod1 F4: Close will close the window, no?

    Wouldn’t Mod1 4 be an alt-4 instead of an alt-f4?

    Confuzzled…..

Have an opinion? Leave a comment:




Check Spelling
Activate Spell Check while Typing
Site Meter
Close
E-mail It