最近终于开始用笔记本,使用Emacs的时候总是不小心碰到touchpad(触模板)导致光标位置移动到其他缓冲区。
将下面的代码加到init.el中,让Emacs忽略鼠标的操作,而且离开了Emacs,touchpad继续工作。
(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))
好了,终于不会在快速打字的时候搞得一团糟了。