scroll (middle) button on thinkpad trackpoint (ubuntu 16.04) suddenly starts pasting

I'm using Ubuntu 16.04 (and Rstudio 1.1.463) on a thinkpad X220, one with a trackpoint mouse. Today this started happening:

When I press the middle (scroll) button above my trackpad, with the intention of using the trackpoint to scroll through my code, the button click instead pastes whatever (if anything) is in my clipboard. This is only happening in Rsutio.

Turns out apparently something similar is the desired behaviour in Ubuntu, and sure enough, on my external mouse, pressing down on the scroll button pastes (I've never used this functionality). But the scroll button on the trackpad does not have this behaviour anywhere else: in any other programme (and in Rstudio up until today), pressing it allows me to scroll.

I thought this behaviour appeared suddenly, without any changes in the software or settings, but that's not true: an ubuntu update happened this morning, which is could be the cause. I believe the following packages were installed: hicolor-icon-theme, desktop-file-utils, bamfdaemon, mime-support, gnome-menus, and man-db and firefox. I have no idea what most of these do, but I could try to rollback an offending one if someone could point me to the potential cuplrit?

Not sure if it's helpful or not, but I'm using Ubuntu 18.04 and pressing middle mouse is indeed pasting everywhere, not only in RStudio.

I don't have a trackpad (only external mouse) to check if that's the case with it as well, but I'm pretty sure it was doing the same.

I can confirm this is a standard behavior of Ubuntu. The middle mouse button pastes your current selection.

I have found it very practical when working on command line.

Never tried to turn it off though, as it is extremely helpful to my workflow...

Thanks both! I understand this is standard behaviour on an external mouse, but it is not so on the trackpoint buttons. For one, it was not doing it until today, secondly, it is now only doing it in Rstudio, nowhere else, and lastly: it means I cannot scroll, because the button has only one possible function.

I forgot to mention that I am running Ubuntu 18.04.02 on a T570, and my middle touchpad button (the one with little raised butts) behaves like this since about forever...
I am even uncertain whether this is an Ubuntu feature or a Debian one.
But lest I be too negative - you might find this helpful: https://help.ubuntu.com/community/MouseCustomizations

Thanks again jlacko. Turns out you are right, mine does this as well, I just never noticed? Anyway, to be more precise about what is going on:

  • Anywhere but Rstudio: when i single click on the scroll button, it pastes what's in the clipboard.
  • In Rstudio: when i single click on the scroll button, nothing happens. instead I have to double click it to paste. two single clicks also seem to work. Feels a bit inconsistent, but can't put my finger on it.
  • Anywhere but Rstudio: when i hold down on the scroll button, and move my mouse, i scroll
  • in Rstudio: when i hold down on the scroll button, and move my mouse, it pastes whatever is in the clipboard. I cannot scroll.

So to be clear: I am not complaining about ubuntu functionality (even though it was unknown to me until now), I am asking about new behaviour in Rstudio, that is not consistent with my mouse's behaviour anywhere else.

Possibly completely unrelated: I also find it super difficult to double-click on a word/variable in Rstudio to highlight it. It's usually fine in a new session, then gets progressively worse and is basically unusable: double-clicking more often than not highlights the whole text. or sometimes the row/paragraph. Different every time. This is the same on both my trackpoint buttons or my external mouse.

This is something that happened to me as well with similar symptoms. New session - everything is fine. As the day progresses - it starts to be impossible to highlight one word. I usually restart sessions quite often, so never found if there is a consistent way to trigger something like this. And it's also happening with 1.2.xxxx RStudio. Finally, I'm also not sure if these two things are connected in any way :slight_smile:.

Oki, in that case it really is a RStudio IDE issue and (and not the more generic Ubuntu one) and I don't know how to help you.

Like @mishabalyasin I terminate sessions rather often for unrelated reasons - I like to give myself a little dopamine shot every now & then by running my code on a clean slate - so this behaviour has not been an issue to me.

Would you mind filing this as a bug report at https://github.com/rstudio/rstudio/issues, so we don't lose track of this?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.