Re: FVWM: Using Windows keys as modifiers

From: Glen Lee Edwards <Glen_at_fcwm.org>
Date: Sun, 7 Oct 2001 17:27:15 -0500 (CDT)

Ionel,

I tried that, and it worked in that it removed the listing from xmodmap. But
Xemacs continued to kick out rather rude error messages about improper key
bindings. The only way I could keep it happy was to go with the current setup;
a pc101 keyboard, and then add in the other keys.

The impression I was left with is that with a pc105 or microsoft keyboard,
Xemacs binds Super_R and Hyper_R to mod3 even if they aren't explicitely put
there by xmodmap.

Glen



Ionel Mugurel =?ISO-8859-2?Q?Ciob=EEc=E3?= writes:
> You could make also the PC104 or PC105 works by inserting a new line
> + "I" Exec exec xmodmap -e "clear Mod3" -e "clear Mod4"
> before the add, or in just one line:
>
> + "I" Exec exec xmodmap -e "keycode 0x73 = Super_L" -e "keycode 0x74 = Hyper_L" -e "keycode 0x75 = Menu" -e "clear Mod3" -e "clear Mod4" -e "add Mod3 = Super_L" -e "add Mod4 = Hyper_L"
>
>
> Ionel
>
>
> Īn data de 7/10/2001, 09:42:44, Glen Lee Edwards a scris:
> > Thanks to this list and the Red Hat list, I've been able to set up the Windows
> > keys on my keyboard as modifiers. This is what I did:
> >
> > Add the following to ~/fvwm/.fvwm2rc
> >
> > (These next lines modify the keys so that they're defined as modifiers. Note - I
> > had to use Super_L and Hyper_L as the modifiers because Super_R and Hyper_R when
> > added to Mod4 also added themselves to Mod3. Setting it this way allows me to
> > use the left window key and the right window key as separate modifiers)
> >
> > ######################## Initialization Functions ############################
> > AddToFunc InitFunction "I" Module FvwmButtons
> > <edit>
> > + "I" Exec exec xmodmap -e 'keycode 115 = Super_L'
> > + "I" Exec exec xmodmap -e 'keycode 116 = Hyper_L'
> > + "I" Exec exec xmodmap -e 'keycode 117 = Menu'
> > + "I" Exec exec xmodmap -e 'add Mod3 = Super_L'
> > + "I" Exec exec xmodmap -e 'add Mod4 = Hyper_L'
> > <edit>
> >
> > AddToFunc RestartFunction "I" Module FvwmButtons
> > <edit>
> > + "I" Exec exec xmodmap -e 'keycode 115 = Super_L'
> > + "I" Exec exec xmodmap -e 'keycode 116 = Hyper_L'
> > + "I" Exec exec xmodmap -e 'keycode 117 = Menu'
> > + "I" Exec exec xmodmap -e 'add Mod3 = Super_L'
> > + "I" Exec exec xmodmap -e 'add Mod4 = Hyper_L'
> > <edit>
> >
> > To create shortcut keys with the above, I used the following:
> >
> > # "3" stands for mod3 "4" for mod4 (xmodmap)
> > Key F1 A 3 gotoDesk 0 0
> > Key F2 A 3 gotoDesk 0 1
> > <etc>
> > Key KP_Enter A 3 GotoDeskAndPage Prev
> > Key KP_Add A 3 GotoDesk +1 0 24
> > Key KP_Subtract A 3 GotoDesk -1 0 24
> > <etc>
> > Key F1 A 4 MoveToDesk 0 0
> > Key F1 A 4 MoveToDesk 0 0
> > Key F2 A 4 MoveToDesk 0 1
> > <etc>
> > Key Left A 3 GotoPage 0 0
> > Key Up A 3 GotoPage 1 0
> > Key Right A 3 GotoPage 1 1
> > Key Down A 3 GotoPage 0 1
> > <etc>
> > Key KP_Home A 3 All (MyBar7) Iconify
> > Key KP_Up A 3 All (MyBar4) Iconify
> > Key KP_Down A 3 All (MyBar2) Iconify
> > Key KP_Right A 3 All (MyBar1) Iconify
> > Key KP_Left A 3 All (MyBar3) Iconify
> > Key KP_Begin A 3 All (MyBar3) Iconify
> >
> > Notes
> >
> > To get the above to work with this keyboard (having the left and right windows
> > keys act as separate modifiers) I had to set this keyboard in
> > /etc/X11/XF86Config to a pc101 keyboard. Setting it to pc105 or microsoft (to
> > get the windows keys to automatically work) did work, but the windows keys
> > defaulted to the same modifier, meaning that I couldn't set them up as separate
> > modifiers. Setting the keyboard to pc101 so that these keys weren't
> > automatically recognized allowed me to individually define them.
> >
> > Syntax
> >
> > Here is my output from xmodmap:
> >
> > $ xmodmap
> > xmodmap: up to 2 keys per modifier, (keycodes in parentheses):
> >
> > shift Shift_L (0x32), Shift_R (0x3e)
> > lock Caps_Lock (0x42)
> > control Control_L (0x25), Control_R (0x6d)
> > mod1 Alt_L (0x40), Alt_R (0x71)
> > mod2 Num_Lock (0x4d)
> > mod3 Super_L (0x73)
> > mod4 Hyper_L (0x74)
> > mod5 Scroll_Lock (0x4e)
> >
> > To get Fvwm2 to recognize mod3 and mod4, I had to use the following syntax:
> >
> > Key KP_Begin A 3 All (MyBar3) Iconify
> >
> > The "3" stands for Mod3. I tried M3, m3, Mod3, and mod3, but only "3" was
> > recognized. To use two modifiers I had to set it up as:
> >
> > Key KP_Begin A M/3 All (MyBar3) Iconify
> >
> > The above works if you hold down the left window key and left alt key
> > simultaneously while pressing the number 5 on the keypad. If you remove the "/"
> > it won't work (been there, done that).
> >
> > I'm using fvwm-2.4.0-2 on a Red Hat 7.0 system.
> >
> > Glen
> --
> 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 majordomo_at_fvwm.org.
> To report problems, send mail to fvwm-owner_at_fvwm.org.
>
--
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 majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Sun Oct 07 2001 - 17:26:56 BST

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:52 BST