4

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)?

1
  • 2
    This is a KeymapNotify event, not a KeyPress event. This event is emited when entering a window and indicate the state of the keyboard. It doesn't mean that any key or button have been pressed.
    – Leiaz
    Commented Jun 6, 2014 at 11:27

1 Answer 1

3

As @Leiaz points out, the KeymapNotify is not actually the problem. I had forgotten to re-load the mod map. The following works. Add this to ~/.Xmodmap:

! Disable button 8
pointer = 1 2 3 4 5 6 7 0 9 10 11 12

(the 8 is left out).

Then reload

xmodmap ~/.Xmodmap

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .