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.
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.
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)))
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With