atom-sublime-select icon indicating copy to clipboard operation
atom-sublime-select copied to clipboard

random pastes when selecting

Open SlimeQ opened this issue 11 years ago • 6 comments

when using this multiselect, whatever is in the clipboard is automatically pasted to each cursor. i'm on ubuntu 14.04

update:

this is happening because middle click is mapped to paste by default... this is ridiculous behaviour. unsure how to change it

SlimeQ avatar Aug 07 '15 17:08 SlimeQ

:+1: having the same issue.

austincummings avatar Aug 10 '15 17:08 austincummings

The middle mouse in Linux pastes whatever is highlighted, which means that using the middle mouse for something like this would cause major issues. Using your normal mouse button, if possible (I'm still figuring out how to do that), would fix it.

Edit: I have fixed it.

I have changed the chunk of code in the config to the following:

  when 'win32'
    selectKey: 'altKey'
    mainMouseNum: 1
    middleMouseNum: 2
    enableMiddleMouse: true
  when 'darwin'
    selectKey: 'altKey'
    mainMouseNum: 1
    middleMouseNum: 2
    enableMiddleMouse: true
  when 'linux'
    selectKey: 'altKey'
    mainMouseNum: 1
    middleMouseNum: 1
    enableMiddleMouse: false
  else
    selectKey: 'altKey'
    mainMouseNum: 1
    middleMouseNum: 1
    enableMiddleMouse: false

Notice that the last two have the mouse numbers changed. I also changed the shiftKey to altKey so that it behaves like Visual Studio, which is pretty much a software industry standard at this point.

ghost avatar Aug 15 '15 00:08 ghost

Having this issue as well, and I think @matt-della has a good solution for it. Why is this package assigning a behavior to a key that already has a default behavior in that operating system? The only problem is, altKey also has the default of moving the window, but that's one that can at least be changed without patching gtk.

devnulljason avatar Nov 03 '15 05:11 devnulljason

@jhealy86 I realized that Linux systems often assign the alt key to move windows around the screen, so using the alt key would also be sub-optimal. However, I do believe that properly configuring either alt-shift or ctrl-shift to override the shift key behavior should work, as long as the middle-click is removed from the equation.

ghost avatar Nov 03 '15 06:11 ghost

I just changed mine to ctrlKey, and you do lose Linux's multi-select with that, but I've honestly never used that feature, and Atom has other (better) ways to do it. So I think that's what I'm going to stick with.

devnulljason avatar Nov 03 '15 06:11 devnulljason

As noted, this was due to the way ubuntu pastes using middle mouse button. Key combinations are now configurable for linux.

bigfive avatar Jan 15 '16 02:01 bigfive