I have tried doing this which I found in another StackExchange post but it doesn't work for me, is there another way to disable the mouse in spacemacs completely, I use evil mode, thanks.
Asked
Active
Viewed 474 times
1
-
Can you just use https://github.com/purcell/disable-mouse as an additional package? – Ryan Apr 11 '18 at 15:53
-
I have tried that. After installing disable-mouse the mouse was still being used by spacemacs. When I restarted spacemacs I saw a line stating: deleting disable-mouse. Mouse was still being used afterwards. @Ryan – Wawrzyniec Pruski Apr 11 '18 at 17:33
-
add it to `dotspacemacs-additional-packages` and make sure you have `(global-disable-mouse-mode)` in your configuration. – Ryan Apr 11 '18 at 17:50
-
Where do I put (global-disable-mouse-mode), which file and what section? @Ryan – Wawrzyniec Pruski Apr 11 '18 at 18:00
1 Answers
1
Add the following to your dotspacemacs-additional-packages
:
dotspacemacs-additional-packages '(
disable-mouse
)
And put the following in the dotspacemacs/user-config
section of your .spacemacs
file:
(global-disable-mouse-mode)
That should disable the mouse for everything in Emacs.

Ryan
- 3,989
- 1
- 26
- 49
-
I tried that on two different machines, mouse still works :( – Wawrzyniec Pruski Apr 11 '18 at 20:29
-
1In the terminal (`emacs -nw`), I managed to do the trick by setting `(xterm-mouse-mode -1)` _inside_ `dotspacemacs/user-config`. – Jir Sep 19 '18 at 16:02
-
@Ryan I have tried the above but mouse still works, something else must be missing or I'm doing something wrong. – Wawrzyniec Pruski Oct 25 '18 at 16:59
-
This finally worked for me: ```(defun dotspacemacs/user-config () (xterm-mouse-mode 0) )``` I got this from: https://emacs.stackexchange.com/questions/21540/how-to-disable-mouse-in-spacemacs – Wawrzyniec Pruski Jan 19 '23 at 15:01