Numpad keybining problem

Hello,

I tried to bind my numpad keys, but they are not working.
Part of my config:

Key KP_2 A 4 Function urxvt-anim Key KP_1 A 4 Exec exec $[fvwm_terminal] -geometry 97x11+297+98 Key KP_3 A 4 Exec exec $[fvwm_terminal] -geometry 97x11+297+709

and here is what I get with xev:

[code]KeyPress event, serial 32, synthetic NO, window 0x1600001,
root 0x66, subw 0x0, time 1193019169, (-66,135), root:(485,560),
state 0x10, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
XLookupString gives 1 bytes: (31) “1”
XmbLookupString gives 1 bytes: (31) “1”
XFilterEvent returns: False

KeyRelease event, serial 32, synthetic NO, window 0x1600001,
root 0x66, subw 0x0, time 1193019257, (-66,135), root:(485,560),
state 0x10, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
XLookupString gives 1 bytes: (31) “1”
XFilterEvent returns: False

KeyPress event, serial 32, synthetic NO, window 0x1600001,
root 0x66, subw 0x0, time 1193019449, (-66,135), root:(485,560),
state 0x10, keycode 88 (keysym 0xffb2, KP_2), same_screen YES,
XLookupString gives 1 bytes: (32) “2”
XmbLookupString gives 1 bytes: (32) “2”
XFilterEvent returns: False

KeyRelease event, serial 32, synthetic NO, window 0x1600001,
root 0x66, subw 0x0, time 1193019529, (-66,135), root:(485,560),
state 0x10, keycode 88 (keysym 0xffb2, KP_2), same_screen YES,
XLookupString gives 1 bytes: (32) “2”
XFilterEvent returns: False

KeyPress event, serial 32, synthetic NO, window 0x1600001,
root 0x66, subw 0x0, time 1193019793, (-66,135), root:(485,560),
state 0x10, keycode 89 (keysym 0xffb3, KP_3), same_screen YES,
XLookupString gives 1 bytes: (33) “3”
XmbLookupString gives 1 bytes: (33) “3”
XFilterEvent returns: False

KeyRelease event, serial 32, synthetic NO, window 0x1600001,
root 0x66, subw 0x0, time 1193019857, (-66,135), root:(485,560),
state 0x10, keycode 89 (keysym 0xffb3, KP_3), same_screen YES,
XLookupString gives 1 bytes: (33) “3”
XFilterEvent returns: False
[/code]

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

It’s different depending on whether you have numlock turned on or off. If you have it on (which your examples indicate), then FVWM is going to treat it as a modifier which is a bad thing – so see the IgnoreModifiers command. Note that if you have numlock off, and bind to KP_END, all should work.

– Thomas Adam

Thanks for the reply.
I’ve tried:

  1. numlock on

Key KP_2 A M Exec exec $[fvwm_terminal] -geometry 97x11+297+709 IgnoreModifiers 2

  1. numlock off
Key     KP_END          A M             Exec exec $[fvwm_terminal] -geometry 97x11+297+709

And it’s not working :frowning:

I use key bindings from the numpad with

IgnoreModifiers L2

to ignore numlock and capslock as a modifier for key bindings and

KP_Begin KP_Down KP_End KP_Home KP_Left KP_Next KP_Prior KP_Right KP_Up
as keysyms (given by xev when numlock is off) and it works fine.
Check that scrolllock is off.

For me, the following combinations are working for KP_2:

Key KP_2      A S    beep    # shift + KP_2
Key KP_2      A S2   beep    # shift + KP_2  with numlock on
Key KP_Down   A M    beep    # alt + KP_2
Key KP_Down   A M2   beep    # alt + KP_2  with numlock on

Note that i dont use IgnoreModifiers. Hope it helps
.imp

Imp, Zonke - thanks guys.
I’ve tried with numlock on, with numlock off, with or whithout scroll lock, with KP_END or with KP_1, with or without IgnoreModifiers - nothing. I don’t get it :confused:

Thanks guys. Problem was silly, as usual. I’ve used KP_END instead of KP_End :smiley: