Is there any way I can disable all mouse click events in Emacs? I tend to get focus issues when I accidentally hit my touch pad on my laptop and suddenly I'm in another Emacs window.
Try this:
(dolist (k '([mouse-1] [down-mouse-1] [drag-mouse-1] [double-mouse-1] [triple-mouse-1]
[mouse-2] [down-mouse-2] [drag-mouse-2] [double-mouse-2] [triple-mouse-2]
[mouse-3] [down-mouse-3] [drag-mouse-3] [double-mouse-3] [triple-mouse-3]
[mouse-4] [down-mouse-4] [drag-mouse-4] [double-mouse-4] [triple-mouse-4]
[mouse-5] [down-mouse-5] [drag-mouse-5] [double-mouse-5] [triple-mouse-5]))
(global-unset-key k))
I've created a package called disable-mouse, which provides local and global minor modes for disabling all mouse interaction in the current buffer or all buffers respectively.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With