Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

emacs 23.4 mouse-2 behaviour on OS-X 10.7

how to map mouse-2 (middle button click) to (cmd + click) or (ctrl+click) on OS X using trackpad so as to display a popup menu under flyspell-mode.

like image 906
George Avatar asked Jun 10 '12 22:06

George


3 Answers

Rather flyspell needs to be fixed to pop up its menu on mouse-3 since it's really more like a context menu. I.e. I recommend a M-x report-emacs-bug about it.

like image 149
Stefan Avatar answered Oct 17 '22 20:10

Stefan


How about mouse-3 like Stefan suggests?

Add this to your init file:

(eval-after-load "flyspell"
    '(progn
       (define-key flyspell-mouse-map [down-mouse-3] #'flyspell-correct-word)
       (define-key flyspell-mouse-map [mouse-3] #'undefined)))
like image 14
event_jr Avatar answered Oct 17 '22 19:10

event_jr


There's already an option built in for this. Take a look at:

mac-emulate-three-button-mouse

Specifically, you should be able to just add:

(setq mac-emulate-three-button-mouse t)

In your .emacs, and then mouse-2 will be Option+Click and mouse-3 will be Cmd+Click

like image 1
Justin Ward Avatar answered Oct 17 '22 20:10

Justin Ward