Subject: FVWM: Q: Dynamic Bind of Menu Items to Keys?

From: David Forrest <[email-masked]>
Date: Mon, 26 Apr 1999 18:34:12 -0400 (EDT)

Dear Sir or Madam,
  Is there a way to dynamically bind menu items to keys? For example I
have
Key Escape      A       C      Menu RootMenu Nop
Key Escape      A       CS       WindowList

AddToMenu RootMenu	"Root Menu"	Title
+			"XTerm"		Exec exec xterm 
+			"Rxvt"		Exec exec rxvt

in my .fvwm2rc and can hit C-S-Escape and then '3' to get the third window
on the list.  Is there a way to make the items in my RootMenu happen if I
do something like:

C-Escape X    >>> do the Xterm item
C-Escape R    >>> do the Rxvt item

I tried to find it in the RTFM, but I could not, I would expect it to be
in the AddToMenu section of the man page as something like:

If the menu-label contains an ampersand character '&' then the character
following the ampersand will activate the menu item.  Case is disregarded,
and if two or more instances of the character are selected, then the
selection cycles between the items, and 'enter' is used to select the
item.  The menu will display the item with the letter underlined. For
Example

AddToMenu RootMenu "Root Menu"       Title
     +      "&Calculator*xcalc.xpm*" Exec xcalc
     +      "&Concentration"         Exec concentration
     +      "X&term"                 Exec xterm

Is there a way to do this that I was unable to find?

Thanks in advance for your time,

Dave.
-- 
 Dave Forrest                                [email-masked]
 (804)-979-8634             http://www.people.virginia.edu/~drf5n/

--
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, 26 Apr 1999 22:03:13 -0400

> Is there a way to do this that I was unable to find?

You don't mention  the release you are  using, I'm going to assume you
are using 2.2.  Eaarlier releases could be different.

The way you did it is correct, except that fvwm2 does not like
2 menu entries with the same hot key, one of them will be ignored.

Check the man page for the term "hotkey".

--
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: Michael Han <[email-masked]>
Date: Mon, 26 Apr 1999 23:27:31 -0700

Previously...
>Check the man page for the term "hotkey".

Multiple hotkey instances in a menu are allowed in the current CVS
code. Expect to see it in 2.4.

Otherwise, what Dan said.
-- 
[email-masked]
The Good Humor man can only be pushed so far
 - The collected wisdom of Bart Simpson
--
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: David Forrest <[email-masked]>
Date: Tue, 27 Apr 1999 19:08:15 -0400 (EDT)

Thanks Dan,

 I am using an earlier version, and I could not find any reference to the
hotkey on the http://www.fvwm.org/fvwm2.html man page.  I just installed
version 2.2, and its manpage does have hotkeys.  Is someone updating the
official page?

I ran the manpage through man2html to get:

http://bootp-6-214.bootp.virginia.edu/~drf5n/fvwm2.html

which is more current than the posted one.

Thanks,

Dave.