Subject: Re: FVWM: MouseFocusClickRaises

From: Dominik Vogt <[email-masked]>
Date: Fri, 16 Nov 2001 14:25:34 +0100

On Thu, Oct 18, 2001 at 03:03:55PM -0700, E Frank Ball wrote:
> I'm using the fvwm2-2.2.4-4 rpm on RedHat 6.2.
> 
> I've got this in my .fvwm2rc files:
> 
> GlobalOpts MouseFocusClickRaises
> # Style * MouseFocusClickRaises
> # switch to this with fvwm 2.4
> # click anywhere in a window to raise it
> 
> It works fine, except when the Num Lock is on.  Is there any way to fix
> this?  It works fine with the caps lock on and I don't care about scroll
> lock (which doesn't work either).

>From the fvwm FAQ:

---------------------------- snip -----------------------------
5.5  Why do NumLock, CapsLock and ScrollLock interfere with
     ClickToFocus and/or my mouse bindings?

A: Because they are treated as modifiers.  You can use the
   IgnoreModifiers command to turn individual modifiers off for
   bindings.  With XFree86 the right command is

     IgnoreModifiers L25

   If you changed your modifiers manually or are using a different
   X server use the 'xmodmap' command to find out which modifiers
   correspond to the keys you want to switch off.

   This command creates a lot of extra network traffic, depending
   on your CPU, network connection, the number of Key Mouse commands
   in your configuration file and the number of modifiers you want to
   ignore.  If you do not have a lightning fast machine or very few
   bindings you should not ignore more than two modifiers.  So do
   not ignore scroll-lock if you have no problem with it.

   A better way to solve this problem is to modify the keyboard
   mapping of your X server.  The commands

     xmodmap -e "clear Lock"
     xmodmap -e "clear Mod2"
     xmodmap -e "clear Mod5"

   remove the CapsLock, NumLock and ScrollLock from the keyboard map.
   Pressing these keys has no effect then.  To re-add them try this:

     xmodmap -e "add Lock = Caps_Lock"
     xmodmap -e "add Mod2 = Num_Lock"
     xmodmap -e "add Mod5 = Scroll_Lock"

   Fvwm has to be restarted to use the changes made by xmodmap.
   Please refer to the man page of the xmodmap command for further
   details.
---------------------------- snip -----------------------------

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].

---

From: E Frank Ball <[email-masked]>
Date: Fri, 16 Nov 2001 10:25:37 -0800

On Fri, Nov 16, 2001 at 02:25:34PM +0100, Dominik Vogt wrote:
} 
}    A better way to solve this problem is to modify the keyboard
}    mapping of your X server.  The commands
} 
}      xmodmap -e "clear Lock"
}      xmodmap -e "clear Mod2"
}      xmodmap -e "clear Mod5"

I ended up using xmodmap to remap the keypad so it always works as a
keypad, disabling numlock forever.

! .Xmod-pad
! xmodmap this file to make keypad always work
!
! xev shows keycodes
! key symbols are in /usr/X11R6/lib/X11/XKeysymDB
!
! fix the keypad so the NumLock doesn't do anything and the keypad always works
clear Mod2
! Mod2 is NumLock
! Now make keypad keys always do numbers
keycode 87 = KP_1
keycode 88 = KP_2
keycode 89 = KP_3
keycode 83 = KP_4
keycode 84 = KP_5
keycode 85 = KP_6
keycode 79 = KP_7
keycode 80 = KP_8
keycode 81 = KP_9
keycode 90 = KP_0
keycode 91 = KP_Decimal

remove Lock = Num_Lock
keysym Num_Lock = Escape
! make the NumLock do something useful

-- 

   E Frank Ball                [email-masked]