Subject: Allowing minimum modifier set for Mouse/Key commands

From: Julian Gilbey <jdg@polya>
Date: Tue, 4 May 1999 01:55:27 +0100 (BST)

I was asked by a user if there was any nice way to say: "If I press
Alt-F1 (=M-F1) then I want such-and-such to happen, *even if Num Lock
or Scroll Lock are on*."  I could handle this in two ways: either say
that any set of modifiers including Meta is held down when F1 is
pressed, or say that only if the modifiers are exactly M, M2, M5 or
M25 (after ignoring Caps Lock) then I will do the action.  At present
(at least with 2.2), the first would require listing all possible
modifiers, I believe, and the second requires listing four cases.  It
turns out that listing all of the cases takes up a lot of system
resources: a list of about 20 key bindings repeated for all four cases
led to a noticeable decline in startup speed.

I propose extending the modifier syntax as follows.  The coding for
this *should* be relatively trivial, although it will require an extra
entry in the Binding struct (although this may have been renamed in
2.3 or whatever).

 - If the modifier set given is minimal, this may be indicated by a
   `+' sign in the modified list.
 - If a given modifier is optional, this may be indicated by a
   following `?'

Thus: "M+" would mean "at least the Meta modifier" and "M2?5?" would
mean "Meta and perhaps also some of Mod2 and Mod5".

I am happy to implement this sometime if this is OK with people.

   Julian

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

  Julian Gilbey, Dept of Maths, QMW, Univ. of London. [email-masked]
             Debian GNU/Linux Developer.  [email-masked]
       -*- Finger [email-masked] for my PGP public key. -*-
--
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: Dominik Vogt <[email-masked]>
Date: Tue, 4 May 1999 03:17:45 +0200

> mean "Meta and perhaps also some of Mod2 and Mod5".

Unfortunately this implementation won't save any critical
resources. You will still have to use the XGrab... routines
for every possible combination of modifiers. The XGrab...
calls are the ones that slow things down. THere seems to
be no other way. Does your user really want to ignore
num-lock/scroll-lock for this binding only? I have done some
work there, but the only fast solution is to simply disable
these keys in your xmodmap. I have done so myself and I must
say that I never missed scroll-lock or num-lock or caps-lock.
Having these keys disabled even helps me when typing into a shell.

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]