[Tfug] Fluxbox key mapping

Claude Rubinson rubinson at u.arizona.edu
Mon Oct 15 10:41:17 MST 2007


On Sun, Oct 14, 2007 at 11:56:28AM -0700, Glen Pfeiffer wrote:
> I am not sure if I understand the RaiseLower functionality 
> correctly. Do you mean that whatever window has focus will either 
> be raised or lowered in comparison to the other windows? If so, 
> then I believe Fluxbox has two separate functions for that: Raise 
> and Lower.

Yep, that's right.  The benefit of RaiseLower is that it's built into
a single function such that it pretty much always "does the right
thing."  Until you mentioned focus issues, I never really thought
about it before.  In fact, the way that I think about it is that I
keep focus on the window that I'm writing to and use RaiseLower to
raise and lower the *other* window.  A semantic difference, to be
sure.

> The issue that I ran into was that you cannot map just one 
> Control key without doing some other steps (someone mentioned 
> those in a different email I think). The following maps will 
> lower the window with focus with the left and right Control keys, 
> and raise the window with focus with Control and the right Alt 
> key.
> 
> Control Control_R :Lower
> Control Alt_R :Raise

Right, because Control (and Shift, and Alt, etc) are considered
modifiers.  What JD was suggesting (and what I've since done and is
indeed quite useful) is to remap Control_R with Xmodmap such that it
generates an F15 keysym.  That means that when you press Control_R, X
thinks that you've pressed F15 (a key that, of course, doesn't
physically exist on your keyboard).  You then map F15 to RaiseLower
(or whatever function you're interested in).  Of course, this assumes
that your WM will let you do that.

To replicate the RaiseLower functionality, you'd simply have to script
the WM such that "If the window that has focus is on top of all other
windows, lower it; otherwise, raise it."

Claude




More information about the tfug mailing list