Key binding

I always use KDE, but now I want to use fvwm2 because I think it’s very beautiful and fast.
So I installed fvwm2.5.12 and start to write the configuration file, but I have some problems with key shortcut configuration. If I write in the .fvwm2rc file

Key p  A        A  Exec exec pan

when I press ‘p’ pan start correctly. But if I write in the configuration

Key p  A        C  Exec exec pan

when I press Ctrl-p nothing happens. That’s the same if I use the modifier ‘M’ instead of ‘C’. I also try to write the follow line:

Key F1  A        A  Exec exec pan

and when I press F1 pan doesn’t start, so I think I have a different key configuration, in fact I have an italian keyboard. How could I know what are the modifier and how to use them? I try to use xmodmap and it returns

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)
mod2        Num_Lock (0x4d)
mod3
mod4        Super_L (0x73),  Super_R (0x74)
mod5        ISO_Level3_Shift (0x71)

but I don’t know how to use them.
Sorry for my bad English and thanks for the advices.

[color=red]Edited by theBlackDragon:
–> Moved from Basic questions.[/color]

All of the examples you gave work fine for me. It might be worth you using the “xev” program to check that they keycodes from that, match with the output of “xmodmap”.

Well, that looks fine to me. If fvwm logs to the file ~/.xsession-errors, I’d start by looking in there for any errors with your keybindings.

– Thomas Adam

You may need to add

IgnoreModifiers L25
to prevent the numlock (2) capslock (L) and scrolllock (5) to interfere with the modifiers for your key bindings

The Fvwm manpage warns against using ignoremodifiers when not needed as it can slow thing down, and as most people can’t activate scroll lock by accident you might as well throw that one out, it could even come in handy as a modifier…

The man reads about network traffic. As I use X11 locally, it does not slow my computer (the line is a quote from the manual).

The line for only numlock and capslock is

IgnoreModifiers L2

In the case numlock is not ignored (the default is only to ingore capslock), all bindings must be doubled. If you use numlock, for instance, you should have

Key p A C Exec exec pan Key p A C2 Exec exec pan

I controlled the keycode with xev and they are the same than xmodmap, so I tried to modify the keyboard settings in the XF86Config: in this way the modifiers works well.
At the end I changed the keyboard configuration as it was at the beginning and when fvwm restart, the modifiers (and also the F1, F2, … ) works.

I don’t understand what was the problem, but now the key binding work, so I can continue to modify my fvwm configuration, and I early come here to ask your help :wink:

Thanks to all

Im trying tu use the Super_L here as a modifer to make bindings like win+q etc…
But I didnt understood well…
if I change it in the xmodmap, how would the bindings be called?
if i use it as mod5 would it be ‘N’ in the binding?

If you added Super to mod5 (for instance with xmodmap -e “clear mod5”
and xmodmap -e “add mod5 = Super_L”), then you can bind an action to Super_L q with

Key q A 5 .....

However, usually, mod4 is chosen for Super_L/R.