cancel
Showing results for 
Search instead for 
Did you mean: 

Why does the CubeIDE in Linux add copied text or edited text to other files open in the editor browser?

GreenGuy
Lead

Very annoying! I will be working on a file open in the default editor, along with other files open, and on the next compile I get a lot of errors because the original place, a line or group of lines, I was editing or copying now appears at random location(s) in the same file or other files that were open. This has actually been going on for sometime but I thought it was something I was doing wrong so I did not report it. It is not difficult to fix since it so obvious when it happens. It is completely random with respect to how much of the copied text, or the line being editted, or where it ends up and in what file. Sometimes it is complete code segments or a single character.

OS: Linux 5.15.0-60-generic

DISTRO: LMint 21 Cinnamon V5.4.12

STM32CubeIDE V:1.11.0

Build 13638_20221122_1308(UTC)

1 ACCEPTED SOLUTION

Accepted Solutions
GreenGuy
Lead

Ascha.3 Thank you a thousand times.

Input Re-Mapper is my new best friend!

Re-Mapped the middle-scroll-wheel button to KEY_DOWN and now the worst that can happen is the cursor plants at one line below the current location. Actually kind of nice, since now if you hold the middle mouse button, it will be the same as holding the down arrow key.

the other thing that was nice was to go into the mouse settings in linux and select "Emulate middle click by clicking both left and right buttons."

View solution in original post

9 REPLIES 9
Pavel A.
Evangelist III

This is a known issue with Eclipse (and other s/w) on Linux, unfortunately.

IIRC, the middle mouse button does "paste" and is very sensitive. Touching it pastes from clipboard in unfortunate places. Especially annoying after Windows, where you get used to decent behavior of mice.

It can be tweaked somewhere in input settings but I never could remember where.

The only reliable solution is to keep the source under version control, watch for undesirable changes and discard.

FBL
ST Employee

Hi @Community member​,

You could try updating to a newer version of CubeIDE1.12.0.

You may need to copy your project in your workspace to avoid duplication issues.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

GreenGuy
Lead

I updated already and it is still happening. Did you see the response from Pavel A? I agree this is the problem. I looked and did not find a control that stops the mouse wheel switch from performing a paste operation. The best answers are; use version control as suggested, don't use the default editor in Eclipse, or don't use a mouse to scroll.

AScha.3
Chief II

>This is a known issue with Eclipse (and other s/w) on Linux

@Pavel A.​  what is "known issue" ?

i was working on Linux since > 15 years and with CubeIDE since first version (on MX linux ) -

never had any error of this kind .

now with cubeide V1.10.1 (didnt update to newer, because when everything working fine --- update is unnecessary risk , something to spoil 🙂 )

If you feel a post has answered your question, please click "Accept as Solution".
GreenGuy
Lead

It is not really so much an issue with Eclipse as it is an issue with the mouse and how sensitive the mouse wheel switch is. You can confirm the behavior by selecting something to copy, locate the cursor to a new location, and then press the mouse wheel and it will paste. Now imagine that there is something in the clip board and you go to another file to look at something else and while scrolling using the mouse you press a little to **** ** the wheel. Presto, pasted! And if you are scrolling fast you will miss it. I have never liked the feature of using the mouse wheel switch except in Solidworks to switch between pan and rotate. It would be great if Eclipse would allow better control of the mouse behavior.

AScha.3
Chief II

ah ok, so it is not a Linux problem, just a "mouse problem" . 🙂

btw there is a file in linux systems to adjust mouse options...i dont remember atm.

+ my mouse has sepatate button for middle key - thats why i never had a problem with this.

+ maybe you could stop the paste action in IDE adjustments -> editor ->

0693W00000aIqOjQAK.png

If you feel a post has answered your question, please click "Accept as Solution".
GreenGuy
Lead

Not just linux, it does this in windows as well. The Preferences you show are for keybindings not mouse behavior. Unfortunately, there is control I can see in the mouse control panel to turn off the middle mouse button and there is no control in Input Re-mapper to tell it to do nothing or something benign.

AScha.3
Chief II

maybe this is help:

https://unix.stackexchange.com/questions/24330/how-can-i-turn-off-middle-mouse-button-paste-functionality-in-all-programs

  • or just use another 5$ mouse...without middle wheel click
If you feel a post has answered your question, please click "Accept as Solution".
GreenGuy
Lead

Ascha.3 Thank you a thousand times.

Input Re-Mapper is my new best friend!

Re-Mapped the middle-scroll-wheel button to KEY_DOWN and now the worst that can happen is the cursor plants at one line below the current location. Actually kind of nice, since now if you hold the middle mouse button, it will be the same as holding the down arrow key.

the other thing that was nice was to go into the mouse settings in linux and select "Emulate middle click by clicking both left and right buttons."