Subject: FVWM: Re: Windows95 enhanced modifiers.

From: Andrew Eskilsson <[email-masked]>
Date: Tue, 7 May 1996 11:47:46 +0200

Original- Subject: Windows95 enhanced modifiers.
X-Url: http://www.pt.hk-r.se/~mpt95aes
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Reply-to: [email-masked]
From: Andrew Eskilsson <[email-masked]>
Date: 07 May 1996 11:47:42 +0200
X-Mailer: September Gnus v0.69/Emacs 19.30

I have one of these windows95 enhanced keyboards, and would like to
utilize the three extra buttons. xev gives me L-meta, R-meta and
menu. How do I add these extra modifiers to fvwm, so I can bind a
function to them? 

	/andy
-- 
 Don't walk in front of me, I might be unable to follow you.
 Don't walk after me, I might be unable to lead you.
 Just walk by my side and be my friend.
--
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: "Barry A. Warsaw" <[email-masked]>
Date: Tue, 7 May 1996 11:23:20 -0400

>>>>> "AE" == Andrew Eskilsson <[email-masked]> writes:

    AE> I have one of these windows95 enhanced keyboards, and would
    AE> like to utilize the three extra buttons. xev gives me L-meta,
    AE> R-meta and menu. How do I add these extra modifiers to fvwm,
    AE> so I can bind a function to them?

I have a Microsoft Natural Keyboard on both my SparcStation and
Solaris x86 systems.  Using xmodmap, I map CapsLock->Control_L and
Control_L->CapsLock.  Then I map Alt_L->Meta_L and Alt_R->Meta_R,
setting the mod 1 bit on both.

Finally, I map Control_R->Hyper_R and set mod 5.  This lets me reserve
the right control key for fvwm only chords without conflicting my
existing application (Emacs and Grail mostly) chord combinations.
This works great, and I include my xmodmap file below (although your
keycodes may differ).

Once downside.  ON the SparcSTation, neither the left and right
Windows keys, nor the Menu key generate keysyms so they are basically
non-existant to X (anybody know a way to change that?).  What's odd is
that the same keyboard on my x86 system (an Intel based P133 runnning
Solaris 2.5), those keys *do* generate keysyms!

-Barry

-------------------- snip snip --------------------
! -*- xrdb -*-
!
! This is an `xmodmap' input file for the Microsoft Natural Keyboard on a
! Sparc Station 5, running through the Sun Interface Converter.
!
! Highly hacked from the pc keyboard setting.
!
! This file presupposes that the keyboard is in the default state, and
! may malfunction if it is not.
!

! CapsLock   => Control_L (w/ ModControl)
! Left Ctrl  => CapsLock (w/ ModLock)
! Left Alt   => Meta_L (w/ Mod1)
! Right Alt  => Meta_R (w/ Mod1)
! Right Ctrl => Hyper_R (w/ Mod5)

remove Lock = Caps_Lock
remove Control = Control_L
remove Mod1 = Meta_L Meta_R
remove Mod2 = Mode_switch
remove Mod4 = Alt_L

keysym Control_L = Caps_Lock
keysym Caps_Lock = Control_L
keysym Meta_R = Hyper_R
keysym Mode_switch = Alt_R

add Lock    = Caps_Lock
add Control = Control_L
add Mod1 = Alt_R Alt_L
add Mod5 = Hyper_R

---

From: H}vard Fosseng <[email-masked]>
Date: Tue, 7 May 1996 12:23:34 +0200

> menu. How do I add these extra modifiers to fvwm, so I can bind a

I'm not entirely sure I understand your question. Do you want some
action taken when these keys are pressed alone, or when some other
keys are pressed in combination with them?

In the latter case, you can do something along the lines of what I've
done: Assign one of X's little used modifiers to the keys, and use
that modifier's number in .fvwm2rc. In your .xsession (or anywhere
else that this will always be done when it needs to) do something
along the lines of:

case $DISPLAYTYPE in
  .
  .
<The displaytype in question>)
        xmodmap - <<-END
		add mod3 = L-meta
		add Mod4 = R-meta
		add mod5 = menu
                END
        ;;

(If these keys by default have other modifiers, you may need to use
clear/remove first. Check the xmodmap man page.)

Now, in your .fvwm2rc you can do things like:

Key i           A       3       Iconify
Key r           A       3       Refresh

etc.

Håvard Fosseng

Håvard Fosseng       S'il fallait tolérer aux autres tout ce qu'on se permet á
Informatics          soi-même, la vie ne serait plus tenable.
University of Oslo                      -- Georges Courteline
[email-masked]

---

From: H}vard Fosseng <[email-masked]>
Date: Tue, 7 May 1996 17:43:48 +0200

> Solaris 2.5), those keys *do* generate keysyms!

Maybe I misunderstand what you're saying, but if the problem is that
the keys have keycodes but no keysyms, that can be solved using xmodmap:

   keycode x = Meta_L
   keycode y = Meta_R
   keycode z = Meta_R

Håvard Fosseng

---

From: "Barry A. Warsaw" <[email-masked]>
Date: Tue, 7 May 1996 11:50:42 -0400

vF> Barry A. Warsaw writes:

    >> Windows keys, nor the Menu key generate keysyms so they are
    >> basically non-existant to X (anybody know a way to change
    >> that?).  What's odd is that the same keyboard on my x86 system
    >> (an Intel based P133 runnning Solaris 2.5), those keys *do*
    >> generate keysyms!

    vF> Maybe I misunderstand what you're saying, but if the problem
    vF> is that the keys have keycodes but no keysyms, that can be
    vF> solved using xmodmap:

    vF> keycode x =3D Meta_L keycode y =3D Meta_R keycode z =3D Meta_R

    vF> H=E5vard Fosseng

    vF> H=E5vard Fosseng S'il fallait tol=E9rer aux autres tout ce
    vF> qu'on se= permet =E1 Informatics soi-m=EAme, la vie ne serait
    vF> plus tenable. University of Oslo -- Georges Courteline
    vF> [email-masked]

---

From: "Barry A. Warsaw" <[email-masked]>
Date: Tue, 7 May 1996 11:51:59 -0400

>>>>> "HF" == H}vard Fosseng <[email-masked]> writes:

    HF> Maybe I misunderstand what you're saying, but if the problem
    HF> is that the keys have keycodes but no keysyms, that can be
    HF> solved using xmodmap:

Oops, I think I meant no keycode.  xev is completely blind to those
keys.

-Barry