Subject: FVWM: Remapping Alt+Tab

From: Richard Curnow <[email-masked]>
Date: Mon, 3 Dec 2001 15:58:13 +0000

I want to remap Alt+Tab to pop up a list of the windows on the current desk
(normal+iconised).  I want the mapping to be such that when I release both
keys, the menu is left up and I can pick one of the windows by pressing the
correct 'short-key' number.

If I do

    Key Tab A M WindowList Root c c CurrentDesk, NoGeometry

the menu disappears when I release the Alt key, and the 0,1,2 etc keys don't
work whilst Alt is held down.  However, if I map

    Key Tab A C WindowList Root c c CurrentDesk, NoGeometry

I can use Ctrl+Tab to do exactly what I want.  Why can't I remap Alt in the
same way?  Does that modifier have special handling that I can't remove?

Thanks
Richard

-- 
Richard \\\ SuperH Core Architect  \\\                 .... At home ...
Curnow  /// [email-masked]  ///     [email-masked]
        \\\ http://www.superh.com/ \\\ http://www.rrbcurnow.freeuk.com/
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Dan Espen <[email-masked]>
Date: Mon, 03 Dec 2001 11:18:48 -0500

> same way?  Does that modifier have special handling that I can't remove?

Look at SelectOnRelease in the fvwm2 man page.

You have to remove it from the WindowList menustyle.

-- 
Dan Espen
444 Hoes Lane  Room RRC 1C-214           E-mail: [email-masked]
Piscataway, NJ 08854                     Phone: (732) 699-5570
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Richard Curnow <[email-masked]>
Date: Mon, 3 Dec 2001 16:44:32 +0000

> You have to remove it from the WindowList menustyle.

I tried

    MenuStyle WindowList SelectOnRelease

(since the manual says not to specify a keyname to remove the Alt feature.)

My Alt+Tab menu still popped down, and also, it didn't have the font,gradient
etc that I'd configured elsewhere via MenuList * entries.  So I tried both of
these (the 2nd guessing that I have a missing arg or something):

    MenuStyle * SelectOnRelease
    MenuStyle * SelectOnRelease ""

both of which made the menu appearance right, but didn't make the popping down
work.  Have I got the syntax wrong, or is something else broken?

Thanks
Richard

---

From: Dan Espen <[email-masked]>
Date: Mon, 03 Dec 2001 11:57:16 -0500

> work.  Have I got the syntax wrong, or is something else broken?

No, sorry, I think I misled you.
Sorry I can't test this right now, but I think you have to add
selectonrelease without an argument to the windowlist command.

---

From: Uwe Pross <[email-masked]>
Date: Tue, 04 Dec 2001 17:02:55 +0100

> work.  Have I got the syntax wrong, or is something else broken?

Have a try with 

MenuStyle WindowList SelectOnRelease none

which worked in my fvwm-2.4.3. It removes all SelectOnRelease events for
WindowList. (The man page might be not right in this case.) 
To get the right style for WindowList you need to declare it for WindowList
explicitly. Like:

MenuStyle WindowList Font -*-lucida-medium-r-*-*-12-*-*-*-*-*-*-*
MenuStyle WindowList MenuColorset   5
MenuStyle WindowList ActiveColorset 6
MenuStyle WindowList HilightBack  $[bg.cs6] 
MenuStyle WindowList DoubleClickTime 200
MenuStyle WindowList Hilight3DThin

Just using:

MenuStyle * ... might be not enough.

Uwe

---

From: Richard Curnow <[email-masked]>
Date: Tue, 4 Dec 2001 16:57:41 +0000

> MenuStyle * ... might be not enough.

Still no luck with this :-(  So, I untarred the source and began exploring.
After a bit of study and a few experiments printing status to stderr, I've
found that the following line does what I want:

    Key Tab A M WindowList Root c c CurrentDesk, NoGeometry, SelectOnRelease Meta_R

where I've just picked Meta_R because at least it's not Meta_L (which is the
Alt key I want to use) - I suppose anything that's not Meta_L will work.

There is certainly some SelectOnRelease processing in the MenuStyle handler,
but that didn't want to play ball.  I printed out the 'before' and 'after'
keycode values and it was showing zero for both for some reason.  Maybe there
is unitialised state for the 'before' value - I'd have expected it to be the
keycode for Meta_L (the compiled in default).

Anyway, problem solved (for me anyway).  Thanks to those who sent me
suggestions to try.

Richard

---

From: Mikhael Goikhman <[email-masked]>
Date: Tue, 4 Dec 2001 21:13:17 +0000

> > MenuStyle * ... might be not enough.

Theoretically you don't really need to redefine anything, this is enough:

  CopyMenuStyle * WindowList
  MenuStyle WindowList SelectOnRelease

Or maybe just:

But I can confirm that the second line (omitting a release key) does not
work as described in the man page. This needs to be fixed. The current
workaround is to specify a dummy key that exists, like "F12".

> Alt key I want to use) - I suppose anything that's not Meta_L will work.

You may specify no SelectOnRelease argument to disable this feature, like:

  WindowList SelectOnRelease

Regards,
Mikhael.