Choose style:

Author Topic: Default mouse behavior  (Read 495 times)

0 Members and 1 Guest are viewing this topic.

Offline John Jenson

  • nOOb
  • *
  • Posts: 19
  • Karma: 0
  • New Forum User
    • View Profile
  • Peppermint version(s): Peppermint 9
Default mouse behavior
« on: July 11, 2019, 09:52:58 am »
The default mouse behavior is for the middle mouse button to paste what is on the clipboard to whatever the pointer is pointing to. I would like to disable this behavior, but I cannot find anywhere in the settings to do this.

When I accidentally push the scroll wheel (middle button) or the mouse falls on the floor and lands on the middle button, whatever is on the clipboard gets pasted to whatever window is open at the time. Being a software engineer, this presents a hazard as a piece of software will then compile with errors and I have to spend time searching through the code to find whatever it was that got pasted in. I've dealt with this behavior for a long time, but I'm now fed up.

Please help me remove this annoyance.

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26273
  • Karma: 2855
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Default mouse behavior
« Reply #1 on: July 11, 2019, 01:59:41 pm »
Try this
run:
Code: [Select]
sudo apt-get install xdotool xsel
then:
Code: [Select]
xed $HOME/.config/peppermint-control-center/xbindkeys.conf
and add these 2 new lines at the bottom
Code: [Select]
"echo -n | xsel -n -i; pkill xbindkeys; xdotool click 2; xbindkeys -f $HOME/.config/peppermint-control-center/xbindkeys.conf"
    b:2 + Release
SAVE the file and exit the text editor.

Back in the terminal reload the xbindkeys config file with:
Code: [Select]
xbindkeys -f $HOME/.config/peppermint-control-center/xbindkeys.conf
« Last Edit: July 11, 2019, 05:07:55 pm by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline John Jenson

  • nOOb
  • *
  • Posts: 19
  • Karma: 0
  • New Forum User
    • View Profile
  • Peppermint version(s): Peppermint 9
Re: Default mouse behavior
« Reply #2 on: July 11, 2019, 05:04:34 pm »
I was going to, but noticed it's already there.

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26273
  • Karma: 2855
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Default mouse behavior
« Reply #3 on: July 11, 2019, 05:08:24 pm »
What's already there ?
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline John Jenson

  • nOOb
  • *
  • Posts: 19
  • Karma: 0
  • New Forum User
    • View Profile
  • Peppermint version(s): Peppermint 9
Re: Default mouse behavior
« Reply #4 on: July 11, 2019, 10:49:47 pm »
What's already there ?

The line you asked me to save in that file.

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26273
  • Karma: 2855
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Default mouse behavior
« Reply #5 on: July 12, 2019, 09:08:42 am »
What's the contents of
Code: [Select]
xed ~/.config/peppermint-control-center/xbindkeys.conf
because something tells me you've previously tried some instructions you've seen on the web, but they're not EXACTLY as I posted them
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline John Jenson

  • nOOb
  • *
  • Posts: 19
  • Karma: 0
  • New Forum User
    • View Profile
  • Peppermint version(s): Peppermint 9
Re: Default mouse behavior
« Reply #6 on: July 13, 2019, 12:03:38 am »
I haven't followed anyone's instructions and I haven't modified that file since I installed Peppermint.

Here is what the file contains:

Code: [Select]
"calc"
    Mod4+F5

"x-terminal-emulator"
    Control+Alt+t

"nemo"
    Mod4+e

"nemo"
    Control+Alt+f

"xfrun4"
    Mod4+r

"xfrun4"
    Alt+F2

"xfce4-popup-whiskermenu"
    Alt+F1

"xfce4-popup-whiskermenu"
    Control+Escape

"xfce4-popup-whiskermenu"
    Super_L

"peppermint-logout"
    Control+Alt+Delete

"scrot 'Screenshot_%Y-%m-%d_%H:%M:%S.png' -e 'mv $f ~/Desktop/'"
    Print

"scrot -u -b 'Windowshot_%Y-%m-%d_%H:%M:%S.png' -e 'mv $f ~/Desktop/'"
    Control+Print

"peppermint-scrot-helper.sh"
    Control+Shift+Print

"lxlock"
    Control+Alt+l

"amixer -q sset Master 3%+ unmute"
    XF86AudioRaiseVolume

"amixer -q sset Master 3%- unmute"
    XF86AudioLowerVolume

"amixer -q sset Master toggle"
    XF86AudioMute

"galculator"
    XF86Calculator

"nemo"
    XF86MyComputer

"sleep 2;xset dpms force off"
    Control+Shift+F7

"peppermint-logout"
    XF86PowerOff

"xfce4-find-cursor"
    Alt+c

"echo -n | xsel -n -i; pkill xbindkeys; xdotool click 2; xbindkeys -f $HOME/.config/peppermint-control-center/xbindkeys.conf"
    b:2 + Release
« Last Edit: July 13, 2019, 09:45:59 am by PCNetSpec »

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26273
  • Karma: 2855
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Default mouse behavior
« Reply #7 on: July 13, 2019, 09:42:23 am »
Trust me, those 2 lines are NOT there by default (I'm the person that created that file)...

I can prove it too .. that file is copied from /etc/skel/.config/peppermint-control-center/xbindkeys.conf to the users home folder upon account creation (during install) ,.. and that line ISN'T in:
Code: [Select]
xed /etc/skel/.config/peppermint-control-center/xbindkeys.conf
So you must have added them.
« Last Edit: July 13, 2019, 09:45:17 am by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline John Jenson

  • nOOb
  • *
  • Posts: 19
  • Karma: 0
  • New Forum User
    • View Profile
  • Peppermint version(s): Peppermint 9
Re: Default mouse behavior
« Reply #8 on: July 15, 2019, 07:43:37 am »
I never added that myself. Perhaps and update/upgrade or a software install put it there.

Anyway, regardless of how it got there; what can I do to stop that middle mouse button behavior?

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26273
  • Karma: 2855
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Default mouse behavior
« Reply #9 on: July 15, 2019, 10:30:59 am »
No update added it, and no third party software would know where we keep the xbindkeys.conf file (that keybinding is VERY specific to Peppermint). Maybe you added it accidentally (by clicking the middle mouse button after copying it on this page), but did you test whether it worked by reloading the xbindkeys config file or rebooting ?

Anyway, if that didn't work (it works for me), what's the output from:
Code: [Select]
xinput --list
« Last Edit: July 15, 2019, 10:36:46 am by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline John Jenson

  • nOOb
  • *
  • Posts: 19
  • Karma: 0
  • New Forum User
    • View Profile
  • Peppermint version(s): Peppermint 9
Re: Default mouse behavior
« Reply #10 on: July 15, 2019, 11:18:16 am »
⎡ Virtual core pointer                       id=2   [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                 id=4   [slave  pointer  (2)]
⎜   ↳ USB Wired Keyboard                         id=9   [slave  pointer  (2)]
⎜   ↳ Microsoft Microsoft 3-Button Mouse with IntelliEye(TM)   id=10   [slave  pointer  (2)]
⎣ Virtual core keyboard                      id=3   [master keyboard (2)]
    ↳ Virtual core XTEST keyboard                id=5   [slave  keyboard (3)]
    ↳ Power Button                               id=6   [slave  keyboard (3)]
    ↳ Power Button                               id=7   [slave  keyboard (3)]
    ↳ USB Wired Keyboard                         id=8   [slave  keyboard (3)]
    ↳ HP WMI hotkeys                             id=11   [slave  keyboard (3)]

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26273
  • Karma: 2855
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Default mouse behavior
« Reply #11 on: July 15, 2019, 03:15:01 pm »
What's the output from:
Code: [Select]
xinput --list-props "Microsoft Microsoft 3-Button Mouse with IntelliEye(TM)"
and can you answer my other question too .. did you TEST the last solution properly ?
« Last Edit: July 15, 2019, 03:26:32 pm by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline John Jenson

  • nOOb
  • *
  • Posts: 19
  • Karma: 0
  • New Forum User
    • View Profile
  • Peppermint version(s): Peppermint 9
Re: Default mouse behavior
« Reply #12 on: July 15, 2019, 04:32:33 pm »
Device 'Microsoft Microsoft 3-Button Mouse with IntelliEye(TM)':
   Device Enabled (138):   1
   Coordinate Transformation Matrix (140):   1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
   Device Accel Profile (264):   0
   Device Accel Constant Deceleration (265):   1.000000
   Device Accel Adaptive Deceleration (266):   1.000000
   Device Accel Velocity Scaling (267):   10.000000
   Device Product ID (258):   1118, 64
   Device Node (259):   "/dev/input/event4"
   Evdev Axis Inversion (268):   0, 0
   Evdev Axes Swap (270):   0
   Axis Labels (271):   "Rel X" (148), "Rel Y" (149), "Rel Vert Wheel" (287)
   Button Labels (272):   "Button Left" (141), "Button Middle" (142), "Button Right" (143), "Button Wheel Up" (144), "Button Wheel Down" (145), "Button Horiz Wheel Left" (146), "Button Horiz Wheel Right" (147)
   Evdev Scrolling Distance (273):   1, 1, 1
   Evdev Middle Button Emulation (274):   0
   Evdev Middle Button Timeout (275):   50
   Evdev Middle Button Button (276):   2
   Evdev Third Button Emulation (277):   0
   Evdev Third Button Emulation Timeout (278):   1000
   Evdev Third Button Emulation Button (279):   3
   Evdev Third Button Emulation Threshold (280):   20
   Evdev Wheel Emulation (281):   0
   Evdev Wheel Emulation Axes (282):   0, 0, 4, 5
   Evdev Wheel Emulation Inertia (283):   10
   Evdev Wheel Emulation Timeout (284):   200
   Evdev Wheel Emulation Button (285):   4
   Evdev Drag Lock Buttons (286):   0


As for last solution being properly tested, I don't know.

I opened "$HOME/.config/peppermint-control-center/xbindkeys.conf"

then I scrolled to the last line to add this:

"echo -n | xsel -n -i; pkill xbindkeys; xdotool click 2; xbindkeys -f $HOME/.config/peppermint-control-center/x$
    b:2 + Release"

...but it was already in there. I didn't think entering in there again would help, so I closed the file and then ran:

"xbindkeys -f $HOME/.config/peppermint-control-center/xbindkeys.conf" like you asked.

Then I hit the scroll wheel button and it emptied the contents of the clipboard into the terminal window; so it hasn't been fixed. Did I miss something?

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26273
  • Karma: 2855
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Default mouse behavior
« Reply #13 on: July 15, 2019, 04:34:12 pm »
Are you running a clipboard manager ?
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline John Jenson

  • nOOb
  • *
  • Posts: 19
  • Karma: 0
  • New Forum User
    • View Profile
  • Peppermint version(s): Peppermint 9
Re: Default mouse behavior
« Reply #14 on: July 15, 2019, 05:00:29 pm »
No.