Mouse text selection to paste buffer with middle button


Dave Jarvis

background

I have a Logitech marble mouse trackball with the scroll function configured as follows:

#!/bin/bash

dev="Logitech USB Trackball"
we="Evdev Wheel Emulation"
xinput set-int-prop "$dev" "$we Button" 8 8
xinput set-int-prop "$dev" "$we" 8 1

This allows me to hold down the small left button and scroll by rolling the trackball up and down, with no effect left or right.

This is a fresh install of Xubuntu 12.04 LTS running Xfce.

question

Using Kubuntu (and many other desktop environments), I am able to:

  1. Select text with the mouse (by dragging the selection or double-clicking/double-clicking the word).
  2. Middle-click (simulated as a small right-click) to paste it into another window (or the same window).

I tried to re-enable the behavior using:

Operating gsettings set org.gnome.settings-daemon.peripherals.mouse middle-button-enabled trueincome No such schema 'org.gnome.settings-daemon.peripherals.mouse'.

The dconf-editortool does not appear org::gnome::settings-daemon::peripherals::mouse. The closest I can find is org.gnome.desktop.a11y.mouse, but it's not set middle-button-enabled.

question

How can I enable "middle-click" of the trackball so that a small right-click can perform a paste of the copy buffer?

Dave Jarvis

configure

Follow the instructions below , this answer and this documentation :

  1. Do not execute the script shown in the question.
  2. Edit /usr/share/X11/xorg.conf.d/10-evdev.conf.
  3. Append the following lines:
    Section "InputClass", Section " 
        Marble Mouse" 
        MatchProduct "Logitech USB Trackball" 
        MatchIsPointer "on" 
        MatchDevicePath "/dev/input/event*" 
        Driver "evdev" 
        Options "ButtonMapping" "1 9 3 4 5 6 7 8 2" 
        option "EmulateWheel" "true" 
        option "EmulateWheelButton" "8" 
        option "ZAxisMapping" "4 5" 
        option "XAxisMapping" "6 7" 
        option "Emulate3Buttons" "true" 
    EndSection
    
  4. Save and restart X.

restart X

Enable Ctrl-Alt-Backspacerestart X as follows:

echo setxkbmap -option terminate:ctrl_alt_bksp >> ~/.xprofile
chmod +x ~/.xprofile
~/.xprofile

this:

  1. Set the small left button as the wheel activator (click and hold to scroll).
  2. Set the small button on the left to be the "back button" (click, no scrolling).
  3. Set the small right button to middle-click to paste.
  4. Enable horizontal and vertical scrolling.
  5. When the chord is pressed, the two large buttons are disabled.

appendix

After restarting X, I found that the scrolling no longer worked, probably due to the upgrade. If this happens to you, try:

  1. Delete the following files (I moved mine to ~/.):
    /usr/share/X11/xorg.conf.d/50-vmmouse.conf 
    /usr/share/X11/xorg.conf.d/50-marblemouse.conf 
    /usr/share/X11/xorg.conf.d/11 -evdev-quirks.conf
    
  2. Remove any other mouse input device settings from:
    /etc/X11/xorg.conf
    

confirm

Use the authentication settings (where 8 is the device number; your device number may vary):

xinput get-button-map 8

Related


Mouse text selection to paste buffer with middle button

Dave Jarvis background I have a Logitech marble mouse trackball with the scroll function configured as follows: #!/bin/bash dev="Logitech USB Trackball" we="Evdev Wheel Emulation" xinput set-int-prop "$dev" "$we Button" 8 8 xinput set-int-prop "$dev" "$we" 8

Mouse text selection to paste buffer with middle button

Dave Jarvis background I have a Logitech marble mouse trackball with the scroll function configured as follows: #!/bin/bash dev="Logitech USB Trackball" we="Evdev Wheel Emulation" xinput set-int-prop "$dev" "$we Button" 8 8 xinput set-int-prop "$dev" "$we" 8

Paste with the middle mouse button

Sriharsha Kalluru Are there any apps that use the middle button to paste the same text every time? I've seen tools to paste clipboard text, but I want the same text to be pasted every time I click the middle mouse button. Karan With AutoHotkey the following ca

Paste with the middle mouse button

Sriharsha Kalluru Are there any apps that use the middle button to paste the same text every time? I've seen tools to paste clipboard text, but I want the same text to be pasted every time I click the middle mouse button. Karan With AutoHotkey the following ca

Capture paste action with middle mouse button

Rehan I'm working on a Linux machine, and unlike Windows, there are two clipboards, the STRG-C and STRG-V clipboards and the clipboard for highlighted text and middle-click paste. Now I'm trying to capture the paste action because I want to validate the clipbo

How to enable paste into terminal with (middle) mouse button

count 0 After that apt-get update && apt-get upgrademy middle mouse button paste stopped working on Xserver/12.04.2 LTS. This may also be due to apt-get autoremoverunning after I just ran it, but I can't remember the specific point when it stopped working. Bas

Missing copy/paste middle mouse button functionality

Gilles An unusual Ubuntu 12.04 system. It's built with minimal installation and doesn't have most of the usual Ubuntu graphical elements: no Unity, no Gnome shell, no LXDE, etc. (I use the i3 window manager). Therefore, instructions such as "Go to System > Uti

How to enable paste into terminal with (middle) mouse button

count 0 After that apt-get update && apt-get upgrademy middle mouse button paste stopped working on Xserver/12.04.2 LTS. This may also be due to apt-get autoremoverunning after I just ran it, but I can't remember the specific point when it stopped working. Bas

Missing copy/paste middle mouse button functionality

Gilles An unusual Ubuntu 12.04 system. It's built with minimal installation and doesn't have most of the usual Ubuntu graphical elements: no Unity, no Gnome shell, no LXDE, etc. (I use the i3 window manager). Therefore, instructions such as "Go to System > Uti

Missing copy/paste middle mouse button functionality

Gilles An unusual Ubuntu 12.04 system. It's built with minimal installation and doesn't have most of the usual Ubuntu graphical elements: no Unity, no Gnome shell, no LXDE, etc. (I use the i3 window manager). Therefore, instructions such as "Go to System > Uti

Capture paste action with middle mouse button

Rehan I'm working on a Linux machine, and unlike Windows, there are two clipboards, the STRG-C and STRG-V clipboards and the clipboard for highlighted text and middle-click paste. Now I'm trying to capture the paste action because I want to validate the clipbo

How to enable paste into terminal with (middle) mouse button

count 0 After that apt-get update && apt-get upgrademy middle mouse button paste stopped working on Xserver/12.04.2 LTS. This may also be due to apt-get autoremoverunning after I just ran it, but I can't remember the specific point when it stopped working. Bas

TableView row selection click on middle mouse button

West Dandan Currently in TableView, row selection doesn't happen when we middle click. If we click the right or left mouse button, the row is selected. I'm trying to have a function to select a row when the middle button is clicked. I already know that includi

TableView row selection click on middle mouse button

West Dandan Currently in TableView, row selection doesn't happen when we middle click. If we click the right or left mouse button, the row is selected. I'm trying to have a function to select a row when the middle button is clicked. I already know that includi

How to disable middle mouse button paste in Atom editor?

Rudy Withers I've investigated extensively but have not found a way to disable middle mouse button paste. I found that Auxclick can be disabled, but it doesn't work for Atom editor: atom --disable-blink-features=Auxclick Can you help me? Middle-click paste can

How to disable middle mouse button paste in Atom editor?

Rudy Withers I've investigated extensively but have not found a way to disable middle mouse button paste. I found that Auxclick can be disabled, but it doesn't work for Atom editor: atom --disable-blink-features=Auxclick Can you help me? Middle-click paste can

Change middle mouse button in Sublime Text

Enterobacter Sublime text on Windows runs middle mouse button as selection range, Shift + right click on Linux. How to set middle mouse button to selection range on Linux? Especially Sublime Text 3 on Ubuntu? Matt Mo You need to create custom mouse mappings in

Middle mouse click doesn't paste selected text in terminal

Skye I recently encountered a strange phenomenon. Normally when we select any text anywhere (browser, file, terminal) it is copied to clipboard and can be pasted by clicking the middle button (wheel in my case). I've used this before, but recently it stopped w

Which mouse button is in the middle?

Radu Murzea: I'm currently developing a program in Java where a specific event has to be fired only when the user clicks with the left and right mouse buttons at the same time. Since this is a bit unconventional, I decided to test it first. here is: import jav

Which mouse button is in the middle?

Radu Murzea: I'm currently developing a program in Java where a specific event has to be fired only when the user clicks with the left and right mouse buttons at the same time. Since this is a bit unconventional, I decided to test it first. here is: import jav

Disable middle mouse button

Tom Hamilton Stubber So I've tried going through various other questions, but they mostly focus on disabling middle mouse button paste. Basically, the middle mouse button on my Logitech G500s is broken and keeps "clicking" randomly, increasing any chance of do

Disable middle mouse button

Ethan Hunt I need a question to help you, how to disable middle mouse click on any link to open new tab in IE 7,8,9. I have tried many things like return false; e.cancelBubble = true;e.returnValue = false; But there is no way to stop IE's ability to open a Ne

Which mouse button is in the middle?

Radu Murzea: I'm currently developing a program in Java where a specific event has to be fired only when the user clicks with the left and right mouse buttons at the same time. Since this is a bit unconventional, I decided to test it first. here is: import jav

Back button to middle mouse button

Protect I want to map the "back" button (xev means "button 7") of a mouse (A4Tech X-7) as the middle mouse button. Is there a way to do this? I'm lost in Google and only find how to map buttons to keyboard shortcuts using xbindkeys etc. Operating system: Cento

Back button to middle mouse button

Protect I want to map the "back" button (xev means "button 7") of a mouse (A4Tech X-7) as the middle mouse button. Is there a way to do this? I'm lost in Google and only find how to map buttons to keyboard shortcuts using xbindkeys etc. Operating system: Cento

Back button to middle mouse button

Protect I want to map the "back" button (xev means "button 7") of a mouse (A4Tech X-7) as the middle mouse button. Is there a way to do this? I'm lost in Google and only find how to map buttons to keyboard shortcuts using xbindkeys etc. Operating system: Cento