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 > Utilities > ..." will not work on such a system.

Also, I've been using an old serial mouse on this system - the Kensington Expert mouse (trackball), and I really like it from an ergonomic standpoint. Currently I have it connected to the system via a serial to PS2 adapter and it works satisfactorily for the most part - including the key copy/paste functionality via the middle mouse button - although some oddities have come up lately . To get around these quirks, I decided to try getting a serial-to-PS2 adapter from the picture and hooking it directly to the serial port.

So I found the instructions to make a serial mouse work under Ubuntu ( https://help.ubuntu.com/community/SerialMouseHowto ), implementing those instructions and hooking the mouse to the serial port did cause most mice to work . The problem is that one of my most used and absolutely must-have features doesn't work with this scenario: I can hold down the left mouse button and drag, copy text from a graphics or terminal program, but I can't get it to work with a left mouse click key to paste it with the middle mouse button at the desired location. In short, there appears to be no middle mouse button functionality in this mode. So I'm working on ways to possibly restore the functionality of that middle button.

I should mention that, of the possible inputattach options, none are very close to my mouse. I've tried several, but some don't work and others don't. I tried --microsoft initially, but also --mshack and --mouseman. Without these, I can't get any form of middle mouse button functionality.

By the way, xev shows that when the mouse is hooked to the system via the Serial-to-PS2 adapter, I have here (starting from the bottom left and moving clockwise around the mouse) buttons 1, 2, 9 and 3 mice. I guess assigning button 9 as the middle button is a good option. or a combination of 2 and 9. However, when I remove the adapter and hook the mouse directly to the serial port, xev indicates that only 2 buttons are present: the upper left and lower right buttons are both reported as button 1, and the upper right and lower right buttons are both reported as button 1. The button is reported as button 3.

So, do I need to do some mouse button mapping? There are 4 physical buttons on this device. Maybe I need to add some supplementary xorg stanzas to the /usr/share/X11/xorg.conf.d/.conf file? Suggestions would be greatly appreciated.

Gilles

I found a working answer at the stackexchange thread https://unix.stackexchange.com/questions/9973/configuring-mouse-for-rightleft-button-simulating-middle-click-for-copy-paste . It involves using the command xinput set-prop, specifically

xinput set-prop "$device_name_or_number" "Evdev Middle Button Emulation" 1

Once this was done, the middle mouse button emulation I needed was restored (pasted on pressing buttons 1 and 3 at the same time).

Afterthought: this seems to be related to evdev, and I have a /usr/share/X11/xorg.conf.d/10-evdev.conf on this system. Maybe my Option Emulate3Buttons true section should be there, not in /etc/X11/xorg.conf?

Summary: To get this solution working on my system, I edited /etc/rc.local (as the directive on the link referenced in the OP's directive) and added the following line of code:

inputattach --daemon --microsoft /dev/ttyS0

Makes the serial mouse mostly usable. Then, I added a line

xinput set-prop "$device_name_or_number" "Evdev Middle Button Emulation" 1

to my .xinitrc file (I don't use any login manager). After restarting and starting X, I can fully use (at least for my needs) the Kensington Expert Mouse. Has the middle button paste function. In addition to a better understanding of how evdev and Xorg fit together, the problem was solved.

Related


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

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

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

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

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

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

Vaadin Grid middle mouse button

F43nd1r I'm trying to simulate normal browser behavior in a vaadin grid, which includes middle-clicking to open in a new tab: addItemClickListener(e -> { boolean newTab = e.getMouseEventDetails().getButton() == MouseEventDetails.MouseButton.MIDDLE

How to handle the middle mouse button?

Gibbs I have an ember component that generates a set of user groups. When the user clicks on one of the list components, it calls the linkAction defined in that component and takes the user to the specific page associated with that list item. However, when the

Alternative hotkey for middle mouse button

some people A few days ago, my middle mouse button broke and could only scroll. The problem was that I used this button a lot and it was the reason he broke, so I searched for a way to "replace" his function and found out about AutoHotKey. I read many docs and

How to handle the middle mouse button?

Gibbs I have an ember component that generates a set of user groups. When the user clicks on one of the list components, it calls the linkAction defined in that component and takes the user to the specific page associated with that list item. However, when the

Vaadin Grid middle mouse button

F43nd1r I'm trying to simulate normal browser behavior in a vaadin grid, which includes middle-clicking to open in a new tab: addItemClickListener(e -> { boolean newTab = e.getMouseEventDetails().getButton() == MouseEventDetails.MouseButton.MIDDLE

Alternative hotkey for middle mouse button

some people A few days ago, my middle mouse button broke and could only scroll. The problem was that I used this button a lot and it was the reason he broke, so I searched for a way to "replace" his function and found out about AutoHotKey. I read a lot of docs

Firefox middle mouse button scrolling

pixel developer How do I get the middle mouse button to work properly in Ubuntu? Clicking the middle button doesn't show the arrow, which allows me to scroll the page by moving the mouse. information: Firefox 3.6.8 Mouse: Microsoft Intellimouse Explorer 3.0 Is

Firefox middle mouse button scrolling

pixel developer How do I get the middle mouse button to work properly in Ubuntu? Clicking the middle button doesn't show the arrow, which allows me to scroll the page by moving the mouse. information: Firefox 3.6.8 Mouse: Microsoft Intellimouse Explorer 3.0 Is

Emulate middle mouse button with AutoHotKey

Buck I want to write a simple script (single line?) to map left shift + right mouse button to middle mouse button (I don't actually have middle mouse button because it's a trackpad). I tried this variation: #(LShift & RButton)::MButton or (LShift & RButton::M

Alternative hotkey for middle mouse button

some people A few days ago, my middle mouse button broke and could only scroll. The problem was that I used this button a lot and it was the reason he broke, so I searched for a way to "replace" his function and found out about AutoHotKey. I read a lot of docs

Vaadin Grid middle mouse button

F43nd1r I'm trying to simulate normal browser behavior in a vaadin grid, which includes middle-clicking to open in a new tab: addItemClickListener(e -> { boolean newTab = e.getMouseEventDetails().getButton() == MouseEventDetails.MouseButton.MIDDLE

How to handle the middle mouse button?

Gibbs I have an ember component that generates a set of user groups. When the user clicks on one of the list components, it calls the linkAction defined in that component and takes the user to the specific page associated with that list item. However, when the

How to handle the middle mouse button?

Gibbs I have an ember component that generates a set of user groups. When the user clicks on one of the list components, it calls the linkAction defined in that component and takes the user to the specific page associated with that list item. However, when the

Alternative hotkey for middle mouse button

some people A few days ago, my middle mouse button broke and could only scroll. The problem was that I used this button a lot and it was the reason he broke, so I searched for a way to "replace" his function and found out about AutoHotKey. I read a lot of docs

Alternative hotkey for middle mouse button

some people A few days ago, my middle mouse button broke and could only scroll. The problem was that I used this button a lot and it was the reason he broke, so I searched for a way to "replace" his function and found out about AutoHotKey. I read a lot of docs

Alternative hotkey for middle mouse button

some people A few days ago, my middle mouse button broke and could only scroll. The problem was that I used this button a lot and it was the reason he broke, so I searched for a way to "replace" his function and found out about AutoHotKey. I read many docs and

"Middle Mouse Button" pastes where the mouse cursor is

Dennis Kuhn [EDIT] : The observed problem is misleading, as it turns out that it stems from the behavior of Google Doc. See the accepted answer. Is it possible to configure the "middle mouse button"-paste option to paste text not where the text cursor is, but