Disable the mouse in Emacs
Want to force yourself to use the keyboard in Emacs, and you don't have a cat available to obstruct your trackpad? Use this local or global minor mode to suppress the default mouse behaviours.
disable-mouse.el is in a directory on your load-path, and
add the following to your
(require 'disable-mouse) (global-disable-mouse-mode)
If you're an Emacs 24 user or you have a recent version of
package.el you can install
disable-mouse from the
MELPA repository. The version of
disable-mouse there will always be up-to-date.
M-x global-disable-mouse-mode, by using
the customisation interface, or by adding code such as the following
to your emacs startup file:
If you want to only disable the mouse in only a certain mode, add
disable-mouse-mode to that mode's hook.
After writing this, I found handoff, which has a similar goal, but aims for more annoyance and frivolity.
Author: Steve Purcell
This little library was extracted from the author's full Emacs configuration, which readers might find of interest.