Subject: FVWM: bug?

From: [email-masked]
Date: Sat, 25 Aug 2001 04:10:41 -0500

Possible bug:

(maybe i just configured something wrong)

F1 and F2 do what F11 and F12 were bound too, irrespective of their own
bindings. F11 and F12 work as expected. I know the keymaps are ok because
I had ctwm doing the exact same config earlier today, so i know hitting
F1 really is sending and F1.

Here are all of my Key definitions:

Key F1 A N Iconify
Key F2 A N Maximize 0 100
Key F3 A N Maximize 100 100
Key F4 A N Close

Key F5 A N Function "terminal"
Key F6 A N Function "browser"

Key F10 A N All [!iconic !sticky !FvwmTaskBar] iconify
Key F11 A N Restart
Key F12 A N Quit

Key Pause A N Function "lock"

Key space A M Popup "client options" Interior 0 0
Key Tab A M WindowList Root c c "Prev FlipFocus"

And the man page uses the following as an example:

Key F1 R A Popup MenuFvwmRoot

So I think I have the syntax right.

My fvwm version is 2.4.0

Please cc me, as I am not on the list.

Thanks,
Brendan
--
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: Mikhael Goikhman <[email-masked]>
Date: Sat, 25 Aug 2001 12:00:31 +0000

> F1 really is sending and F1.

I remember having similar problems with another machine:

  % xmodmap -display -pk | grep '(F1[12])'
     95         0xffc8 (F11)
     96         0xffc9 (F12)

  % xmodmap -display starlight:0 -pk | grep '(F1[12])'
     67         0xffbe (F1)     0xffc8 (F11)
     68         0xffbf (F2)     0xffc9 (F12)
     95         0xffc8 (F11)
     96         0xffc9 (F12)

Unlike CTWM (I only guess about it), FVWM has a logic to bind the binding

  Key F11 A N Restart

to all keycodes (67 and 95) that this keysym (F11) is assigned to.

To fix this I would execute in ~/.xinirc:

  % xmodmap -e 'keycode 67 = F1' -e 'keycode 68 = F2'

Or maybe just change the order of your "Key F1" and "Key F11" lines? :)

Regards,
Mikhael.

---

From: [email-masked]
Date: Sat, 25 Aug 2001 08:12:24 -0500

> Or maybe just change the order of your "Key F1" and "Key F11" lines? :)

Thanks alot for that suggestion Mike. It works to switch the order
of the "Key" declarations, but it took me a little bit to straighten
out in my head exactly why. So I am posting the comment i added to
that section of my .fvwm2rc file, which explains explicitly why this
works.

# Note: why F11 and F12 *must* be bound before F1 and F2
#
# $ xmodmap -pk | grep '(F1[12])'
#      67         0xffbe (F1)     0xffc8 (F11)
#      68         0xffbf (F2)     0xffc9 (F12)
#      95         0xffc8 (F11)
#      96         0xffc9 (F12)
#
# The above output is one reason why FVWM might think that a binding
# to key 'F11' should become active when either a keycode 67 or a keycode
# 95 is received. The fact that (apparently) FVWM does not allow two
# events to be bound to one keycode allows us to fix the situation by
# placing the definitions for keys F11 and F12 before those of F1 and F2.
# Thus, when F1 is bound, it "steals" the keycode 67 association from
# F11, which previously was in possession of it.

Brendan

---

From: Dominik Vogt <[email-masked]>
Date: Sat, 25 Aug 2001 14:27:22 +0200

On Sat, Aug 25, 2001 at 04:10:41AM -0500, [email-masked] wrote:
> ...
> ...

That's because Shift-F1 is the same as F11.  It is not possible to
always do the right thing with key bindings automatically.  Your
xmodmap (X keyboard mapping table) probably looks like this:

 key code       key symbol      key symbol (with shift)
 ------------------------------------------------------  
     67         0xffbe (F1)     0xffc8 (F11)    
     95         0xffc8 (F11)    

The F11 key generates the key code 95 while the F1 key generates
key code 67.  With no modifiers pressed, this is interpreted as
the key name "F11" or "F1".  But if the F1 key is pressed together
with shift, it generates "F11" too.  Therefore the code in fvwm
treats the F1 key as if it were labeled F11 in this case.
Sometimes this is a good idea (namely on the numeric key pad) and
sometimes it isn't (in your case).  I have written a patch that
will be part of the upcoming 2.4.1 release.  It deals with the
given situation, but can only handle the shift and caps-lock
modifier keys.

A simple workaround is to swap the order of the Key commands in
your config file.  With

  Key F11 A N Restart
  Key F1 A N Iconify

The F1 key overrides the binding created by the F11 key, so that
both keys should work as expected.

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" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].