Disable mouse clicks in Emacs

后端 未结 3 1875
感动是毒
感动是毒 2020-12-31 03:36

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 Ema

相关标签:
3条回答
  • 2020-12-31 04:27

    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))
    
    0 讨论(0)
  • 2020-12-31 04:33

    Try making a M-x describe-key, and press the touch pad. Emacs will then tell you what the key is currently bound to. Unbind it and you should be ok. The touch pad should still work on the emacs frame, though.

    0 讨论(0)
  • 2020-12-31 04:35

    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.

    0 讨论(0)
提交回复
热议问题