第一种方案(推荐)
* 前提: melpa 源
安装 disable-mouse packages
init.el 文件中加入一行
(global-disable-mouse-mode)
第二种方案
(define-minor-mode disable-mouse-mode
"A minor-mode that disables all mouse keybinds."
:global t
:lighter " 🐭"
:keymap (make-sparse-keymap))
(dolist (type '(mouse down-mouse drag-mouse
double-mouse triple-mouse))
(dolist (prefix '("" C- M- S- M-S- C-M- C-S- C-M-S-))
;; Yes, I actually HAD to go up to 7 here.
(dotimes (n 7)
(let ((k (format "%s%s-%s" prefix type n)))
(define-key disable-mouse-mode-map
(vector (intern k)) #'ignore)))))
(disable-mouse-mode 1)
第三种方案(在 spacemacs 中可用)
(xterm-mouse-mode -1 )
网友评论