> I still see problems with your patch.
>
> 1. You are using 'keysym == 0x2C' for comma, but what happens if NumLock
> is on, and you press comma on the main keyboard, not on the keypad?
> Shouldn't X11 send XK_KP_xxx event in that case (something like
XK_KP_Decimal)?
The file /usr/include/X11/keysymdef.h has the line
#define XK_KP_Separator 0xFFAC /* separator, often comma */
This appears to be appropriate. But X11 is not sending it in debian (sid) or
fedora. The output from xev when, with the numlock initially off, I press
comma, kp_comma, numlock, comma and kp_comma is:
KeyPress event, serial 22, synthetic NO, window 0x2c00001,
root 0x3f, subw 0x0, time 69979707, (124,72), root:(364,205),
state 0x0, keycode 59 (keysym 0x2c, comma), same_screen YES,
XLookupString gives 1 bytes: ","
KeyRelease event, serial 27, synthetic NO, window 0x2c00001,
root 0x3f, subw 0x0, time 69979799, (124,72), root:(364,205),
state 0x0, keycode 59 (keysym 0x2c, comma), same_screen YES,
XLookupString gives 1 bytes: ","
KeyPress event, serial 27, synthetic NO, window 0x2c00001,
root 0x3f, subw 0x0, time 69980420, (124,72), root:(364,205),
state 0x0, keycode 91 (keysym 0xff9f, KP_Delete), same_screen YES,
XLookupString gives 0 bytes: ""
KeyRelease event, serial 27, synthetic NO, window 0x2c00001,
root 0x3f, subw 0x0, time 69980521, (124,72), root:(364,205),
state 0x0, keycode 91 (keysym 0xff9f, KP_Delete), same_screen YES,
XLookupString gives 0 bytes: ""
KeyPress event, serial 27, synthetic NO, window 0x2c00001,
root 0x3f, subw 0x0, time 69980955, (124,72), root:(364,205),
state 0x0, keycode 77 (keysym 0xff7f, Num_Lock), same_screen YES,
XLookupString gives 0 bytes: ""
KeyRelease event, serial 27, synthetic NO, window 0x2c00001,
root 0x3f, subw 0x0, time 69981057, (124,72), root:(364,205),
state 0x10, keycode 77 (keysym 0xff7f, Num_Lock), same_screen YES,
XLookupString gives 0 bytes: ""
KeyPress event, serial 27, synthetic NO, window 0x2c00001,
root 0x3f, subw 0x0, time 69981755, (124,72), root:(364,205),
state 0x10, keycode 59 (keysym 0x2c, comma), same_screen YES,
XLookupString gives 1 bytes: ","
KeyRelease event, serial 27, synthetic NO, window 0x2c00001,
root 0x3f, subw 0x0, time 69981850, (124,72), root:(364,205),
state 0x10, keycode 59 (keysym 0x2c, comma), same_screen YES,
XLookupString gives 1 bytes: ","
KeyPress event, serial 27, synthetic NO, window 0x2c00001,
root 0x3f, subw 0x0, time 69982436, (124,72), root:(364,205),
state 0x10, keycode 91 (keysym 0x2c, comma), same_screen YES,
XLookupString gives 1 bytes: ","
KeyRelease event, serial 27, synthetic NO, window 0x2c00001,
root 0x3f, subw 0x0, time 69982535, (124,72), root:(364,205),
state 0x10, keycode 91 (keysym 0x2c, comma), same_screen YES,
XLookupString gives 1 bytes: ","
> 2. Please generate unified diffs, 'using diff -u' for patches.
Sorry. I am really embarrassed. An unified diff is attached.
>
> --
> Dmitry.
Rafael