Discussion:
[Aspell-user] How do I switch the mouse buttons in flyspell mode in emacs?
Tony An
2011-04-14 02:46:50 UTC
Permalink
I found it's rather odd that in flyspell mode in emacs,
if a word is marked mis-spelled, I should press the middle
mouse button to get the list suggested words, not the right
mouse button, which does nothing.

Since I am using a wheel mouse, my middle button is the
wheel - not only it's hard to click on, it also sometimes
mistaken as "paste" if I do click on it outside the popup
suggestion menu.

Is there a way I can weak the buttons so that I can use the
right mouse button to bring up the menu of suggested words
in flyspell mode? I think that should be default behavior
as most "menu" type of lists are brought by right mouse
button instead of the middle button.

Thanks for any tip about this.

Tony
Tony An
2011-04-15 03:53:06 UTC
Permalink
Found a solution:

(eval-after-load "flyspell"
'(define-key flyspell-mode-map [down-mouse-3] 'flyspell-correct-word))

________________________________________
From: Tony An
Sent: Wednesday, April 13, 2011 7:46 PM
To: aspell-***@gnu.org
Subject: How do I switch the mouse buttons in flyspell mode in emacs?

I found it's rather odd that in flyspell mode in emacs,
if a word is marked mis-spelled, I should press the middle
mouse button to get the list suggested words, not the right
mouse button, which does nothing.

Since I am using a wheel mouse, my middle button is the
wheel - not only it's hard to click on, it also sometimes
mistaken as "paste" if I do click on it outside the popup
suggestion menu.

Is there a way I can weak the buttons so that I can use the
right mouse button to bring up the menu of suggested words
in flyspell mode? I think that should be default behavior
as most "menu" type of lists are brought by right mouse
button instead of the middle button.

Thanks for any tip about this.

Tony
Tony An
2011-04-18 22:53:01 UTC
Permalink
I am back to square one, because this remapping [down-mouse-3] has a side effect: normally down-mouse-3 is used for (mouse-save-then-kill CLICK) - and I will lose that functionality (left click, then right click at a different location to highlight the entire region) if I remapping it to 'flyspell-correct-word. Unless this is a bug...

Anybody?

-----Original Message-----
From: Tony An
Sent: Thursday, April 14, 2011 8:53 PM
To: aspell-***@gnu.org
Subject: RE: How do I switch the mouse buttons in flyspell mode in emacs?

Found a solution:

(eval-after-load "flyspell"
'(define-key flyspell-mode-map [down-mouse-3] 'flyspell-correct-word))

________________________________________
From: Tony An
Sent: Wednesday, April 13, 2011 7:46 PM
To: aspell-***@gnu.org
Subject: How do I switch the mouse buttons in flyspell mode in emacs?

I found it's rather odd that in flyspell mode in emacs, if a word is marked mis-spelled, I should press the middle mouse button to get the list suggested words, not the right mouse button, which does nothing.

Since I am using a wheel mouse, my middle button is the wheel - not only it's hard to click on, it also sometimes mistaken as "paste" if I do click on it outside the popup suggestion menu.

Is there a way I can weak the buttons so that I can use the right mouse button to bring up the menu of suggested words in flyspell mode? I think that should be default behavior as most "menu" type of lists are brought by right mouse button instead of the middle button.

Thanks for any tip about this.

Tony
Tony An
2011-05-20 21:13:33 UTC
Permalink
Silly me. I figured out my solution:

Go to flyspell.el and search for mouse-2, and replace them to mouse-3. Done.

-----Original Message-----
From: Tony An
Sent: Monday, April 18, 2011 3:53 PM
To: aspell-***@gnu.org
Subject: RE: How do I switch the mouse buttons in flyspell mode in emacs?

I am back to square one, because this remapping [down-mouse-3] has a side effect: normally down-mouse-3 is used for (mouse-save-then-kill CLICK) - and I will lose that functionality (left click, then right click at a different location to highlight the entire region) if I remapping it to 'flyspell-correct-word. Unless this is a bug...

Anybody?

-----Original Message-----
From: Tony An
Sent: Thursday, April 14, 2011 8:53 PM
To: aspell-***@gnu.org
Subject: RE: How do I switch the mouse buttons in flyspell mode in emacs?

Found a solution:

(eval-after-load "flyspell"
'(define-key flyspell-mode-map [down-mouse-3] 'flyspell-correct-word))

________________________________________
From: Tony An
Sent: Wednesday, April 13, 2011 7:46 PM
To: aspell-***@gnu.org
Subject: How do I switch the mouse buttons in flyspell mode in emacs?

I found it's rather odd that in flyspell mode in emacs, if a word is marked mis-spelled, I should press the middle mouse button to get the list suggested words, not the right mouse button, which does nothing.

Since I am using a wheel mouse, my middle button is the wheel - not only it's hard to click on, it also sometimes mistaken as "paste" if I do click on it outside the popup suggestion menu.

Is there a way I can weak the buttons so that I can use the right mouse button to bring up the menu of suggested words in flyspell mode? I think that should be default behavior as most "menu" type of lists are brought by right mouse button instead of the middle button.

Thanks for any tip about this.

Tony

Loading...