Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: notonroof on February 15, 2014, 09:41:49 pm
-
Hi, Code::Block 13.12 sometimes randomly paste fragments of code at random position in my codebase. But now i discovered its not bug, its feature! :-) When i copy in Code::Blocks something to clipboard and then press midle mouse button, text is pasted. Please how to disable it?
Here http://forums.codeblocks.org/index.php?topic=18267.0 (http://forums.codeblocks.org/index.php?topic=18267.0) are written "On windows, just disable the MouseSap-plugin"
I am on windows, i disabled it, uninstaled MouseSap-plugin, restarted Code::Blocks, but this has no effect, nothing helps.
Please, how to disable this error prone feature?
-
In CB 12.11, disabling MouseSap did stop this feature.
In CB 13.12, it failed to stop this feature.
Tim S.
-
In Code::Blocks 13.12, middle mouse paste is emulated by the core application to improve functionality, as compared to Linux' native middle mouse paste (which cannot easily be used due to a wx28 clipboard bug). Unfortunately, this means that disabling this can currently only be done by editing the source and recompiling (the relevant file is sdk/cbstyledtextctrl.cpp line 125).
-
IMHO the enforcement in the core shouldn't be the way. Anyway I disable it by enabling scrolling in 'Mouse Drag Scrolling' plugin and choosing the 'Mouse Key To Use:' as 'Middle'.
-
@scarphin: Thanks! It works.
Step-by-step guide, how to disable middle mouse button click paste in Code::Blocks 13.12 :
* Go into Main menu/Settings->Editor->Mouse Drag Scrolling
* Check "Scrolling Enabled"
* In "Mouse Key To Use" select "Middle"
* Click OK to close dialog
* Restart Code::Blocks
-
@scarphin, @notonroof
thanks, it' good. I was looking for a while !
Regards
-
hello everybody,
two things:
a) does this mean the mouse sap plugin is obsolete? what other benefits/functions does it provide?
b) the solution of assigning the middle mouse button to something else really does work perfectly, but non the less it is only a hack...
regards
-
The mousesap plugin was created to emulate the linux paste behavior on windows.
It still works for that purpose. I use (and like) it nearly every day.
It provides additional functions such as: mark text, then just middle click every where you want that text pasted.
-
@Pecan
Maybe I understood wrong... ???
As Alpha posted, that behavior is already implemented since c::b 13.12 by the core application... so it should already work the same under windows and linux since then...
The described functionality is exactly to copy some text, or to just mark it, and then paste that text by middle mouse button where ever you click. So that would be the same behavior that you described for mouse sap. Does mouse sap do anything else besides that? Am I missing something, maybe?
Greetings
PS: and yes, someone using a version of c::b prior to 13.12 under windows would still have use for the mouse sap plugin...
-
With mousesap plugin, the user does not have to ctrl-c or ctrl-v.
Mark some text, then just paste via clicking the middle mouse.
If you Ctrl-c some text, then mark any other text, middle mouse replaces the marked text.
mousesap is a little more versatile.
-
@Pecan
thx for the answer.
i am using a linux OS and the last c::b compiled from svn. i just activated the mouse sap plugin and tried out that feature you mentioned ("...Ctrl-c some text, then mark any other text, middle mouse replaces the marked text...."). This does not work on my linux box. Instead it pastes the same selected text inside the selected text itself at the place I clicked (it does not replace the marked text with the contents of the Ctrl-c).
I like the feature, but as it seams, it does not work on a linux system. So for the time being I won't use mouse sap, as its other functionality (...mark some text and paste it somewhere else with middle mouse click...) already is implemented in c::b core app or works on linux out of the box. Actually I use it a lot in many applications :)
regards