Subject: FVWM: Windows Keys as modifyers ?

From: Markus Grunwald <[email-masked]>
Date: Thu, 28 Jun 2001 07:52:49 +0200

hi !

Is it possible to use the windows keys as modifyers? I would like to use the rightmost (menu) key in combination with cursor to change desktop pages...

Thanks !
-- 
Markus Grunwald

Registered Linux User Nr 101577      PGP Key:
http://counter.li.org                http://www.grunwald.2xs.de
--
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: Max Ischenko <[email-masked]>
Date: Thu, 28 Jun 2001 09:25:44 +0300

> Is it possible to use the windows keys as modifyers? I would like to use the rightmost (menu) key in combination with cursor to change desktop pages...

Yup. First run xev to find out what codes are generated by that keys.
Optional use xmodmap to redefine the KeySym and the write bindings
in your rc file.

-- 
Best regards, Maxim F. Ischenko.

---

From: Markus Grunwald <[email-masked]>
Date: Thu, 28 Jun 2001 08:30:53 +0200

Hi !

> Optional use xmodmap to redefine the KeySym and the write bindings

Sounds good - but my problem begins with the fvwm configuration... How do I use these Keys as Modifyers ? All I know is how they work as "normal" Keys, as in:

# Super Moves Screen left/up,
# Hyper/Menu         right/down
Key Super_R	A	N	Scroll -100000 +0
Key Super_R 	A   S   Scroll +0 -100000
Key Menu	A	N	Scroll +100000 +0
Key Menu    	A   S   Scroll +0 +100000

Does

Key Up		A   Menu Scroll .....
work ???

-- 
Markus Grunwald

---

From: Dominik Vogt <[email-masked]>
Date: Thu, 28 Jun 2001 08:45:23 +0200

> Key Up		A   Menu Scroll .....

You have to set them up as modifiers first.  The list of defined
modifiers can be displayed with

  $ xmodmap

The output looks something like this:

  shift       Shift_L (0x32),  Shift_R (0x3e)
  lock      
  control     Control_L (0x25),  Control_R (0x6d)
  mod1        Meta_L (0x40)
  mod2      
  mod3        Mode_switch (0x71)
  mod4        Super_L (0x73),  Super_R (0x74)
  mod5      

To remove key symbols from modifiers, use

  $ xmodmap -e "clear Lock"
  $ xmodmap -e "clear Mod5"

To add modifiers use this syntax:

  $ xmodmap -e "add Lock = Caps_Lock"
  $ xmodmap -e "add Mod2 = Num_Lock"
  ...

You have to restart fvwm before this works properly.

Bye

Dominik ^_^  ^_^

--
Dominik Vogt, email: [email-masked]
LifeBits Aktiengesellschaft, Albrechtstr. 9, D-72072 Tuebingen
fon: ++49 (0) 7071/7965-0, fax: ++49 (0) 7071/7965-20
--
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: Max Ischenko <[email-masked]>
Date: Thu, 28 Jun 2001 10:02:26 +0300

> Sounds good - but my problem begins with the fvwm configuration... How do I use these Keys as Modifyers ? All I know is how they work as "normal" Keys, as in:

Oops. I've misunderstood you.
AFAIK there are several modifiers in X protocol. (at least,
man n bind mentions Mod[1-5] along with control and meta).
So you can try to xmodmap window key to unused one and then use it in fvwmrc.
I don't know how to do it.

---

From: Markus Grunwald <[email-masked]>
Date: Thu, 28 Jun 2001 09:38:49 +0200

Hi !

> Is it possible to use the windows keys as modifyers? I would like to use the rightmost (menu) key in combination with cursor to change desktop pages...

Thanks to the help of Max Ischenko and Dominik Vogt ( and xkeycaps) I got the following result:

grunwalm@winlinux1: > xmodmap
xmodmap:  up to 2 keys per modifier, (keycodes in parentheses):

lock        Caps_Lock (0x42)
mod1        Alt_L (0x40)
mod2        Num_Lock (0x4d)
mod3        Mode_switch (0x71)
mod4        Super_L (0x73)
mod5        Super_R (0x74)

In fvwm2rc the following allows me absolute and relative positioning using cursor and Keypad:

Key	Left	  A	  4	    Scroll -100000 +0
Key Up        A   4     Scroll +0 -100000
Key	Right	  A	  4	    Scroll +100000 +0
Key Down      A   4     Scroll +0 +100000

# Go To Page

Key KP_7      A   4     GotoPage 0 0
Key KP_8      A   4     GotoPage 1 0
Key KP_9      A   4     GotoPage 2 0
Key KP_4      A   4     GotoPage 0 1
Key KP_5      A   4     GotoPage 1 1
Key KP_6      A   4     GotoPage 2 1
Key KP_1      A   4     GotoPage 0 2
Key KP_2      A   4     GotoPage 1 2
Key KP_3      A   4     GotoPage 2 2

# Move window to Page

Key KP_7      A   S4     MoveToPage 0 0
Key KP_8      A   S4     MoveToPage 1 0
Key KP_9      A   S4     MoveToPage 2 0
Key KP_4      A   S4     MoveToPage 0 1
Key KP_5      A   S4     MoveToPage 1 1
Key KP_6      A   S4     MoveToPage 2 1
Key KP_1      A   S4     MoveToPage 0 2
Key KP_2      A   S4     MoveToPage 1 2
Key KP_3      A   S4     MoveToPage 2 2

And this is just GREAT :) Thanks a lot to both of you. I love fvwm2 ;)

-- 
Markus Grunwald