Subject: FVWM: Disable global key bindings for a single application (please reply personally yo me)

From: Thomas Glanzmann <[email-masked]>
Date: Thu, 11 Jul 2002 11:49:58 +0200 (MEST)

I appended my .fvwm2rc. I have a few global keybindings, which allow me to
resize, move and destroy windows. But I also use UserModeLinux (something like a
vmware for Linux and free). In this UserModeLinux I also have a fvwm2 with the
same Configuration running. So I want this global key strokes disabled for this
specific window. Is that possible? At the moment I press the Num Lock outside
the application ... so that my host fvwm keystrokes are disabled (but the
UserModeLinux don't get the enabled Num Lock), so that I can use my keybindings
in the client application ... I am looking for a Style which disables the global
key strokes for a specific application ... again :)

Please reply personally to me because I am no longer on the list.

Greetings,
	Thomas

--
Thomas Glanzmann  ++49 (0) 9131 85-28725   Department of Computer Science III
Martensstrasse 3  D-91058 Erlangen Germany   University of Erlangen-Nuremberg
http://www3.informatik.uni-erlangen.de/Research/Projects/UMLinux/umlinux.html

# $Id: .fvwm2rc,v 1.43 2002/07/10 15:37:27 sithglan Exp $

EdgeScroll 0 0
EdgeResistance 0 0
DeskTopSize 2x2

Style "*" NoIcon, NoTitle, SloppyFocus, NoHandles, TileCascadePlacement
Style "MPlayer" BorderWidth 0, HandleWidth 0
Style "Untitled" BorderWidth 0, HandleWidth 0
Style "*.pdf" BorderWidth 0, HandleWidth 0
Style "faui47" BorderWidth 0, HandleWidth 0
Style "bluescreen" BorderWidth 0, HandleWidth 0, StaysOnTop

Mouse  1     R      A         Menu RootMenu Nop
Mouse  2     R      A         Menu Window-Ops Nop
Mouse  3     R      A         WindowList
Key    M     W      CM        Move
Key    R     W      CM        Resize
Key    S     W      CM        Stick
Key    D     W      CM        Delete
Key    C     W      CM        Close
Key    K     W      CM        Destroy
Key    B     W      CM        Maximize 100 0
Key    L     W      CM        Maximize 0 100
Key    F     W      CM        Maximize
Key    X     W      SCM       Raise
Key    D     A      SCM       Exec echo `hostname`$DISPLAY > ~/.display
Key    X     W      CM        Lower
Key    Left  A      C         Scroll -100 0
Key    Up    A      C         Scroll 0 -100
Key    Right A      C         Scroll 100 0
Key    Down  A      C         Scroll 0 100
Key    X     A      SC        Exec exec xterm -T xterm       -ls -e bash
Key    S     A      SC        Exec exec xterm -T screen      -ls -e ssh -t pk screen -x 20771
Key    D     A      SC        Exec exec xterm -T DEVELscreen -ls -e ssh -t pk screen -x 282
Key    K     A      SC        Exec exec ssh-add ~/.ssh/id_dsa
Key    N     A      SC        StartNetscape
Key    O     A      SC        StartOpera
Key    B     A      SC        Exec exec xterm -T bluescreen -bg \#0101FE -fg white -ls -e bash
Key    Z     A      SC        Exec exec ssh faui05 /local/mozilla-0.9.6/bin/mozilla
Key    W     A      SC        Exec exec $CITRIX
Key    G     A      SC        Exec exec gvim
Key    C     A      SC        Exec ssh faui04b /proj/i4card/bin/xgk.sos5
Key    A     A      SC        StartAcro
Key    R     A      SC        Restart $FVWM
Key    F4    A      M         Exec exec /local/ciptools/bin/xlock -mode blank -remote

AddToMenu RootMenu      "Root Menu"     Title
+                       "XTerm"         Exec exec xterm -T xterm       -ls -e bash
+			""		Nop
+			"KDE"		Restart $KDEDIR/bin/startkde
+                       ""              Nop
+                       "Fvwm Window Ops"         Popup Window-Ops
+                       ""              Nop
+                       "Refresh"       Refresh
+                       ""              Nop
+                       "Exit"     	Quit
+			"Restart"       Restart $FVWM

AddToMenu Window-Ops    "Window Ops"    Title
+                       "Move"          Move
+                       "Resize"        Resize
+                       "(De)Iconify"   Iconify
+                       "(Un)Stick"     Stick
+                       "(Un)Maximize"  Maximize
+                       ""              Nop
+                       "Delete"        Delete
+                       "Close"         Close
+                       "Destroy"       Destroy
+                       ""              Nop
+                       "Refresh Window" RefreshWindow

DestroyFunc StartNetscape
AddToFunc   StartNetscape
     + I Exec /local/netscape-4.79/.arch.os/bin/netscape
     + I Wait Netscape
     + I Next (Netscape) Maximize 100 100

DestroyFunc StartOpera
AddToFunc   StartOpera
     + I Exec opera
     + I Wait Opera
     + I Next (Opera) Maximize 100 100

DestroyFunc StartAcro
AddToFunc   StartAcro
     + I Exec /local/AcroRead/bin/acroread
     + I Wait Acrobat
     + I Next (Acrobat) Maximize 100 100

--
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: Dominik Vogt <[email-masked]>
Date: Thu, 11 Jul 2002 12:00:14 +0200

On Thu, Jul 11, 2002 at 11:49:58AM +0200, Thomas Glanzmann wrote:
> in the client application ...

Sorry, at the moment there is no way to do this at the moment.  Key
bindings are always globally applied to all windows.  Even if they
could be selecte on a per-window basis, the bindings with "A(ny)"
context would still be global.

> I am looking for a Style which disables the global

> Please reply personally to me because I am no longer on the list.

Treason!

Bye

Dominik ^_^  ^_^

 --
Dominik Vogt, mail: [email-masked], phone: 0721/91374-382
Schlund + Partner AG, Erbprinzenstr. 4-12, D-76133 Karlsruhe
--
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: "Rob 'Feztaa' Park" <[email-masked]>
Date: Thu, 11 Jul 2002 21:09:32 -0600

> context would still be global.

Wouldn't it be possible to write a function that would check if the
current window is a certain window, and if so unbind all the
keybindings, and if not (or if no window is focused), rebind all the
keybindings, and then use FvwmAuto to run this function instead of
raising/lowering the window? (FvwmAuto lets you choose what to do when
focus changes, iirc)

-- 
Rob 'Feztaa' Park
http://members.shaw.ca/feztaa/
--
The main problem I have with cats is, they're not dogs.
		-- Kevin Cowherd
--
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: Dominik Vogt <[email-masked]>
Date: Fri, 12 Jul 2002 10:48:07 +0200

> raising/lowering the window? (FvwmAuto lets you choose what to do when

Yes, that is possible, but it's vastly inefficient and probably
very slow (depending on the number of key bindings, the number of
ignored modiefiers and the connection to the X server).

Bye

Dominik ^_^  ^_^