Subject: FVWM: key/mouse binding lists

From: [email-masked] (Todd Fries)
Date: Sat, 15 Jun 1996 19:53:43 -0500 (CDT)

>From what I can tell, fvwm keeps a linked list of keybindings and mouse bindings
that are all applied to each window that is captured at the time the window
is captured, and at no other time.

This behavior is ok if you are not:

a) redefining keybindings
b) playing games that require 'dumping' keybindings
c) anything else similar...

Let me explain.

Like 'Style "*" NoTitle', 'Key Left A M -10 +0' does not take effect until
I either recapture every window, or popup a new window, which then has the
desired effect.  My guess is this has something to do with the X protocol or
a per window info fvwm keeps track of or something...

What I would like to point out that should (imho) be on the todo list is
the ability to undefine a keybinding or mouse binding.  Currently, when one
defines a keybinding, it is added to a linked list of keybindings...but I see
no way currently to remove it from this list.  For example, if I want to
define a function as below, I cannot:

AddToFunc run_a_game
+ "I" Key Left A M (undefine)
+ "I" Key Right A M (undefine)
+ "I" Key Up A M (undefine)
+ "I" Key Down A M (undefine)
+ "I" Key Left A C (undefine)
+ "I" Key Right A C (undefine)
+ "I" Key Up A C (undefine)
+ "I" Key Down A C (undefine)
+ "I" Key Left A SC (undefine)
+ "I" Key Right A SC (undefine)
+ "I" Key Up A SC (undefine)
+ "I" Key Down A SC (undefine)
+ "I" Key Left A SM (undefine)
+ "I" Key Right A SM (undefine)
+ "I" Key Up A SM (undefine)
+ "I" Key Down A SM (undefine)
+ "I" Exec $1 $2 $3 $4 $5 $6
+ "I" Wait $1
+ "I" Key Left        A       C       Scroll -100 0
+ "I" Key Right       A       C       Scroll +100 +0
+ "I" Key Up          A       C       Scroll +0   -100
+ "I" Key Down        A       C       Scroll +0   +100
+ "I" Key Left        A       M       Scroll -10 +0
+ "I" Key Right       A       M       Scroll +10 +0
+ "I" Key Up          A       M       Scroll +0   -10
+ "I" Key Down        A       M       Scroll +0   +10
+ "I" Key Left        A       SC      CursorMove -1 0
+ "I" Key Right       A       SC      CursorMove +1 +0
+ "I" Key Up          A       SC      CursorMove +0   -1
+ "I" Key Down        A       SC      CursorMove +0   +1
+ "I" Key Left        A       SM      CursorMove -10 +0
+ "I" Key Right       A       SM      CursorMove +10 +0
+ "I" Key Up          A       SM      CursorMove +0   -10
+ "I" Key Down        A       SM      CursorMove +0   +10

(at least I don't see any way to do this...).

Currently, to get around this, when I go to play Doom or
quake, I must restart fvwm, as I (at startup) don't have the
keys bound to anything...I use a menu option to read the
keybindings file...

Anyone want to tackle this?  I kindof know what needs to
happen (if a keybinding 'function' is a '-', for example,
and it is in the linked list of keybindings, remove and
free it...) but I'm not sure if I understand X or fvwm
well enough to pull it off gracefully...

Anyone willing to help here?
-- 
Todd Fries .. [email-masked] .. [email-masked] .. [email-masked]
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
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: <[email-masked]> (Charles Hines)
Date: Mon, 17 Jun 1996 15:50:05 -0400

>>>>> "Todd" == Todd Fries <[email-masked]> writes:

Todd> From what I can tell, fvwm keeps a linked list of keybindings
Todd> and mouse bindings that are all applied to each window that is
Todd> captured at the time the window is captured, and at no other
Todd> time.
....
Todd> What I would like to point out that should (imho) be on the todo
Todd> list is the ability to undefine a keybinding or mouse binding.
....
Todd> Anyone want to tackle this?  I kindof know what needs to
Todd> happen (if a keybinding 'function' is a '-', for example,
Todd> and it is in the linked list of keybindings, remove and
Todd> free it...) but I'm not sure if I understand X or fvwm
Todd> well enough to pull it off gracefully...

Todd> Anyone willing to help here?

I do have something related in the TO-DO list already:

  - Setting Key's via FvwmTalk or Read requires Recapture to take effect?

and I planned to look into that, as it doesn't seem necessary to me.

I agree that there should be a way to dynamically unbind them as well,
so I'm adding that to the TO-DO list right now.

Chuck

---

From: Todd Tyrone Fries <[email-masked]>
Date: Mon, 17 Jun 1996 18:32:37 -0500 (CDT)

> so I'm adding that to the TO-DO list right now.

Cool.

However, I don't know how we can 'put this into use' but it is almost a
feature that a recapture is required to re-do the 'per-window' information.

For example, I like most of my rxvt's to have titles.  But some of them
I don't.  How do I do this?

1) a menu option with 'Style "rxvt" NoTitle'
2) Exec rxvt
3) a different menu option with 'Style "rxvt" Title'

This gets me what I want...and this would break if immediately changing the
style of rxvt's to not have a title meant every rxvt suddenly had no title..

Would it be possible to create a module that lets us look at all of the
'per-window' settings, and dynamically change this?

I know there is FvwmConifig, and another person working on a tcl/tk script
to configure fvwm based on the rc files....it would really be nice to be
able to spawn a Module like 'FvwmProperties' for instance, either stand-alone
to modify global settings, or based upon a window, to examine and modify
just it's attributes...

This pretty much breaks down into:

a) Is there a protocol defined that allows modules to find out EVERYTHING
   based upon a window id #, like 'does it have a title right now', 'what
   keybindings does it have right now', etc?  Ifnot, would it be useful
   to implement?
b) Is it possible for modules to change the above info?
c) Is it possible to do a per-window (i.e. not EVERY window) recapture?

If I'm not making any sense, please let me know...
--

---

From: <[email-masked]> (Charles Hines)
Date: Tue, 18 Jun 1996 08:30:59 -0400

>>>>> "Todd" == Todd Tyrone Fries <[email-masked]> writes:

>> so I'm adding that to the TO-DO list right now.

Todd> Cool.

Todd> However, I don't know how we can 'put this into use' but it is
Todd> almost a feature that a recapture is required to re-do the
Todd> 'per-window' information.

You misunderstand me slightly, I think.  Key & mouse bindings don't
apply to individual windows, but everywhere based on the context
(i.e. global info).  That shouldn't require a recapture, but does
right now as you observed.  Recaptures would still be required for
window specific info to take effect, and I don't intend to change
that, as that makes sense.

But, I'd like to make a way to recapture an individual window, so you
can make changes (like your removing of the titlebar) on individual
existing windows, which you mentioned at the end of your note as well.

Well, gotta get to some meetings...

Later,
Chuck

*******************************************************************************
Charles K. Hines <[email-masked]>
IBM Logic Synthesis Developer [BooleDozer (TM)]
Martial Arts Instructor [Modern Arnis, Presas Style Filipino Martial Arts]

         "Go back to sleep, Chuck.  You're just havin' a nightmare
             -- of course, we ARE still in Hell." (Gary Larson)
*******************************************************************************
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
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].