Spanish:
ButtonPress event, serial 40, synthetic NO, window 0x5600001,
state 0x10, button 10, same_screen YES
ButtonRelease event, serial 40, synthetic NO, window 0x5600001,
state 0x10, button 10, same_screen YES
Finnish:
ButtonPress event, serial 40, synthetic NO, window 0x5600001,
state 0x10, button 10, same_screen YES
ButtonRelease event, serial 40, synthetic NO, window 0x5600001,
state 0x2010, button 10, same_screen YES
US:
ButtonPress event, serial 40, synthetic NO, window 0x5600001,
state 0x10, button 10, same_screen YES
ButtonRelease event, serial 40, synthetic NO, window 0x5600001,
state 0x4010, button 10, same_screen YES
For some reason unknown to me, the state of the button release event changes with the keyboard layout (for every mouse button in the same way). The changed bits are 13th and 14th, which according to X11/X.h don't have any meaning. Wiping all the meaningless bits from the state makes it work for all my layouts. I think it shouldn't break anything. Patch is attached.
Best regards,
Alberto