Code::Blocks Forums

User forums => Help => Topic started by: rhino on June 07, 2010, 07:12:34 pm

Title: Middle Mouse Button - how to prevent pasting?
Post by: rhino on June 07, 2010, 07:12:34 pm
Hi,
The 'paste' function assigned to the middle mouse button is really comfortable for my friends, but I just hate it.
I prefer 'normal' ctrl+v and I don't like it when I accidentally click it, and the clipboard's content automatically pastes into the textfield.
I've looked for an option which would prevent that, for a long time, but I couldn't find it anywhere in the settings.
Can you please tell me, can I disable it? And if yes, how can I do it?
It's important for me. Thanks in advance.
EDIT: Of course without modifying the source code :D
Title: Re: Middle Mouse Button - how to prevent pasting?
Post by: oBFusCATed on June 07, 2010, 07:52:35 pm
Probably you need to search the forum, to find the answer...
Title: Re: Middle Mouse Button - how to prevent pasting?
Post by: rhino on June 08, 2010, 03:34:27 pm
I've looked for a solution in this forum already, but I didn't find any.
Title: Re: Middle Mouse Button - how to prevent pasting?
Post by: frithjofh on June 08, 2010, 07:47:34 pm
I think this mouse behavior is provided by the so called MouseSap plugin. At least under linux OS. Just try to disable this plugin.

Regards

frithjofh
Title: Re: Middle Mouse Button - how to prevent pasting?
Post by: oBFusCATed on June 08, 2010, 08:18:38 pm
I've looked for a solution in this forum already, but I didn't find any.
Are you sure?

Try again with "middle paste" as a search string in the forum's search....
http://forums.codeblocks.org/index.php?action=search

and the first result: http://forums.codeblocks.org/index.php/topic,7711.0.html
Title: Re: Middle Mouse Button - how to prevent pasting?
Post by: rhino on June 08, 2010, 11:58:26 pm
Thanks, that helped me a lot, but after disabling MouseSap there's still some problem.
When some text is selected and I press the middle mouse button, the selected text automatically gets copied and pasted twice in some really strange way. Example:
(http://www.img.rhino.boo.pl/other/mmb_tr.png)
1.Here we have a clear text.
2.I select a small part of it.
3.I click it with middle mouse button...
4.Voila! That's the result.
Title: Re: Middle Mouse Button - how to prevent pasting?
Post by: frithjofh on June 09, 2010, 12:07:37 am
That is a perfectly logic behavior. You obviously right-clicked between the tokens WPARAM, and LPARAM); . So the selected text got inserted right there. The only thing which could seem strange is that the selection mark stays where it was, now marking as selected a part of the originaly selected tokens and a part of the newly inserted. But what would be the alternative? To split the selection and select simultaneously to separated tokens? Interseting. If you then right-click again into a selection: what becomes inserted? how will the selection be splited afterwards?

regards

frithjofh
Title: Re: Middle Mouse Button - how to prevent pasting?
Post by: rhino on June 09, 2010, 03:11:19 pm
I do not right-click it. I didn't use the right mouse button at all.
Title: Re: Middle Mouse Button - how to prevent pasting?
Post by: frithjofh on June 09, 2010, 03:54:26 pm
my mistake. I beg your pardon. just substitute right-click for middle-click in my last post

regards

frithjofh