Subject: [PATCH] kill menus with Ctrl-G (as in emacs)

From: Tony Finch <[email-masked]>
Date: Sat, 5 Jan 2002 04:35:33 +0000

--- ./fvwm/menus.c.orig	Sat Jan  5 04:19:21 2002
+++ ./fvwm/menus.c	Sat Jan  5 04:31:46 2002
@@ -1053,6 +1053,7 @@
   case XK_Escape:
   case XK_Delete:
   case XK_KP_Separator:
+  case XK_g: /* emacs */
     /* abort */
     saction = SA_ABORT;
     break;
--- ./fvwm/fvwm2.1.orig	Tue Oct 30 19:16:52 2001
+++ ./fvwm/fvwm2.1	Sat Jan  5 04:23:08 2002
@@ -1629,9 +1629,10 @@
 executes the current item;
 .SM Insert
 opens the "More..." sub-menu if any;
-.SM Escape
-and
+.SM Escape,
 .SM Delete
+and
+.SM Ctrl-G
 exit the current sequence of menus.
 
 The pointer is warped to where it was when the menu was invoked if
--- ./ChangeLog.orig	Sat Jan  5 04:27:27 2002
+++ ./ChangeLog	Sat Jan  5 04:26:32 2002
@@ -1,3 +1,8 @@
+2002-01-05  Tony Finch <[email-masked]>
+
+	* fvwm/menus.c (menuShortcuts):
+	Allow Ctrl-G to close the menu.
+
 2001-12-13  Dominik Vogt  <[email-masked]>
 
 	* fvwm/borders.c (RedrawTitle):
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: "Dmitry Yu. Bolkhovityanov" <[email-masked]>
Date: Sat, 5 Jan 2002 11:05:22 +0600

> +++ ./fvwm/menus.c	Sat Jan  5 04:31:46 2002

	In fact, this will have an effect of cancelling the menu by just
<g>, no matter whether the <Ctrl> is pressed or not.  Sure, there's no
problem, since menu items' accelerators are checked first, so that menu
item with "g" hotkey will still work.  But description in the manpage is
incorrect.

	_________________________________________
	  Dmitry Yu. Bolkhovityanov
	  The Budker Institute of Nuclear Physics
	  Novosibirsk, Russia

---

From: Tony Finch <[email-masked]>
Date: Sat, 5 Jan 2002 05:37:47 +0000

> item with "g" hotkey will still work.  But description in the manpage is

Yes, the reasoning for that is that I was copying the behaviour of the
N and P keys. I'm not bothered either way.

--- menus.c.orig	Sat Jan  5 04:19:21 2002
+++ menus.c	Sat Jan  5 05:35:22 2002
@@ -1056,6 +1056,10 @@
     /* abort */
     saction = SA_ABORT;
     break;
+  case XK_g: /* emacs */
+    if (fControlKey)
+      saction = SA_ABORT;
+    break;
 
   case XK_space:
   case XK_Return:

---

From: Dominik Vogt <[email-masked]>
Date: Sat, 5 Jan 2002 21:36:29 +0100

> +++ menus.c	Sat Jan  5 05:35:22 2002

Good idea, I think I'll make a more general patch that also
handles ctrl-a (start of menu), ctrl-e (end of menu), ctrl-f
(next item), ctrl-b (last item), ctrl-right (next section) and
ctrl-left (previous section).

Bye

Dominik ^_^  ^_^

 --
Dominik Vogt, [email-masked]
Reply-To: [email-masked]
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]