I'm having a similar problem to this question - I run Linux with an Apple Mouse connected which has these horrible side buttons which I press accidentally all the time. Among other things, it has revealed a bug in Thunderbird that caused it to completely wipe my IMAP inbox.
So I have to deactivate that button. The answer given in the linked question unfortunately does not fully work, because I am seeing another key event being emitted (as shown by running xev
):
ButtonPress event, serial 36, synthetic NO, window 0x3200001,
root 0x283, subw 0x3200002, time 150944932, (37,43), root:(39,148),
state 0x0, button 8, same_screen YES
EnterNotify event, serial 36, synthetic NO, window 0x3200001,
root 0x283, subw 0x0, time 150944840, (37,43), root:(39,148),
mode NotifyGrab, detail NotifyInferior, same_screen YES,
focus YES, state 0
KeymapNotify event, serial 36, synthetic NO, window 0x0,
keys: 4294967171 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ButtonRelease event, serial 36, synthetic NO, window 0x3200001,
root 0x283, subw 0x3200002, time 150945092, (37,43), root:(39,148),
state 0x0, button 8, same_screen YES
LeaveNotify event, serial 36, synthetic NO, window 0x3200001,
root 0x283, subw 0x0, time 150944975, (37,43), root:(39,148),
mode NotifyUngrab, detail NotifyInferior, same_screen YES,
focus YES, state 0
Using the following entries in ~/.Xmodmap
gets rid of the button-press events:
! Disable buttons 8 and 9
pointer = 1 2 3 4 5 6 7 0 0
But the key event is different. I don't see a key code, instead this enumeration of numbers under keys
. The first number is hex 0xffffff83 or understood as 32-bit signed integer -125.
How do I deactivate the emission of the above mentioned key event (KeymapNotify
)?