Computer Mice
For Text Pasting

(that is,
with programmable TOP-buttons)

(Logitech, SteelSeries,
and other brands)

Home > RefInfo menu >

Computer topics menu (Hardware section) >

This Computer-Mice-for-Text-Pasting Info page

! Note !
More notes and images on computer mice
that are suitable for fast-and-easy text paste
editing operations may be added
--- if/when I re-visit this page.


In the 1999 to 2005 timeframe (pre-retirement), I was working on Silicon Graphics Unix workstations that were equipped with computer mice with a middle-mouse-button. I used that middle-mouse-button hundreds of times per day to paste text into code (or documents) in a text editor window --- after selecting text from another window with a 'swipe' of the left-mouse-button.

After my retirement started on 2005 January 01, I was working on home computers, and at that time the 'scroll-wheel' --- in the place of a 'middle-mouse-button' --- had become popular on computer mice for 'personal computers'. It was impossible to find a mouse with a middle-button instead of a middle-scroll-wheel.

In 2009, I migrated to using Linux on my home computers. Around that time, I resolved to find a mouse that I could use for 'pasting text' --- without having to press on a scroll-wheel --- and while preserving the usual use of the left and right mouse buttons, for selecting items and for invoking pop-up menus for special functions.

In 2013, I described one mouse that looked promising on a web page titled Logitech 'Zone Touch' Mouse T400. (On that page, I described my frustration in trying to do 'text-paste' with a scroll wheel.)

It turned out that it was difficult to use a middle-mouse-button on the 'Zone Touch' mouse without accidentally touching a middle-touch-area of the mouse that was used for scrolling.

In addition, the mouse was a wireless mouse with batteries, and I kept forgetting to use an on/off button on the underside of the mouse to reduce battery consumption --- and I did not like to deal with batteries.

I tried some mice with extra programmable buttons on the side of the mouse --- like the Logitech M510 (wireless) --- but I found that when I pressed on a side-button to paste text, invariably the mouse would move a little bit, and I would paste the text in the wrong spot.

    On the Silicon Graphics workstations, I did not have to establish the location to paste the text by clicking with the left-mouse-button. I could just move the mouse-cursor to the 'place-to-paste' and simply click on the middle-mouse-buttton. In other words, it took just one click to do the paste, not two --- NOT one click with 'mouse-button-1', then another click with 'mouse-button-2'. Just one click with 'mouse-button-2'.

Mice with extra buttons on top:

So I started looked around for mice with extra buttons on top of the mouse --- programmable buttons.

I even devised a Mouse-Button-Configurator using the Tcl-Tk scripting language to make a nice GUI. I originally posted the code (and description and screenshot images) at Later, I incorporated this utility into a 'tkGooies' system that I offer on a Freedom Environment software web site (, and I provided the code and description and screenshots on a 'tkPointerSettings' web page.

This 'tkPointerSettings' utility uses the Unix/Linux X-windows command 'xinput' to perform 're-mapping' of button functions of computer mice. I intended to find a mouse that I like and then use the 'tkPointerSettings' utility (or the 'xinput' command) to map one (or more) of the extra buttons to do the 'text paste' function.

Near the bottom of those 'tkPointerSettings' web pages, there are some images of mice that look like they have 'top buttons' that might be usable for the 'easy, trouble-free text pasting' that I hoped to achieve --- like in my old Silicon Graphics days.

Unfortunately, I found that NONE of the mice manufacturers provide information on which of the extra buttons on their mice are programmable.

The manufacturers may provide some software to configure the mice ... software for Microsoft Windows or for Apple Mac, but NOT for Linux. But they do not reveal the technical specifications of their mice to the extent that I could be assured that I could program at least one of the extra buttons to do a 'text paste'.

In fact, sometimes the extra buttons are 'hard-wired' to send a certain control code, and it is not possible to re-program those buttons to 're-map' its function to a 'standard mouse-button-2 paste-text' function.

    In some cases, it is possible to change the function of the 'hard-wired' buttons, BUT it requires additional Linux software beyond the 'xinput' command. I did not want to get into that much 'monkey business'.

Because of the poor documentation of the mouse-manufacturers in regard to the technical specifications of the mouse buttons, I found that I would usually have to buy a promising looking mouse, plug the mouse into one of my Linux computers, and use the query facility of the 'xinput' command to determine the default mappings of the mouse buttons --- and determine whether the top-button(s) that I wanted to use are 're-mappable'.

    By the way, I prefer to use a 'wired' mouse, because I don't like to deal with batteries in 'batteried' mice --- and because I have had bad experiences with 'wireless' mice performing 'flakily' --- probably because of electromagnetic intererence in my house, from cordless phones, a microwave oven, a wireless router, or other electro-magnetic-wave-generating devices.

I found one mouse (the Logitech G300 wired Gaming Mouse) that has the features that I want.

And I have found several other mice that I plan to test with the 'xinput' command and document how their extra top-buttons can be used to 'paste text', including:

  • Logitech G300, wired, M/N M-U0029, P/N 810-002265
  • Logitech G402 Hyperion Fury, wired, P/N 920-004069
  • Logitech G502 Proteus Core, wired, P/N 910-004074
  • Logitech Trackman Marble, wired, P/N 910-000806
  • Logitech Trackball M570, wireless, P/N 910-003283
  • SteelSeries, WorldOfWarcraft, Legendary Edition, wired, PN62050
  • SteelSeries 3GC USB Rumble PC Game Controller, USB cord, PN69001

    I include the USB Game Controller because it was available at a local Walmart store, for less than $40, and it may be interesting to experiment with it --- in regard to using the game controller for other things besides games --- such as 'text pasting'.

I plan to add my button-mapping documentation to the help-text available in the 'tkPointerSettings' utility. That text is available via the 'Help' button on the GUI.

In addition to that, here is some button-mapping documentation ... below.

How to Change Mouse Button Functions :   (using 'xinput')

The basic steps are:

  • get the 'Device-ID' (name or ID-number) of the mouse
  • get the default 'Map-list' of the mouse
  • determine the numbers of the buttons that you want to re-map
  • change the 'function-mapping' of the mouse-buttons

To get the 'Device-ID':

You can use the 'xinput list' command to get the device-name of your mouse. Example output:

$ xinput list

"Virtual core pointer"	id=0	[XPointer]
	Num_buttons is 32
	Num_axes is 2
	Mode is Relative
	Motion_buffer is 256
	Axis 0 :
		Min_value is -1
		Max_value is -1
		Resolution is 0
	Axis 1 :
		Min_value is -1
		Max_value is -1
		Resolution is 0
"Virtual core keyboard"	id=1	[XKeyboard]
	Num_keys is 248
	Min_keycode is 8
	Max_keycode is 255
"AT Translated Set 2 keyboard"	id=2	[XExtensionKeyboard]
	Num_keys is 248
	Min_keycode is 8
	Max_keycode is 255
"UVC Camera (046d:0807)"	id=3	[XExtensionKeyboard]
	Num_keys is 248
	Min_keycode is 8
	Max_keycode is 255
"Logitech Gaming Mouse G300"	id=4	[XExtensionKeyboard]
	Num_keys is 248
	Min_keycode is 8
	Max_keycode is 255
"Power Button"	id=5	[XExtensionKeyboard]
	Num_keys is 248
	Min_keycode is 8
	Max_keycode is 255
"Power Button"	id=6	[XExtensionKeyboard]
	Num_keys is 248
	Min_keycode is 8
	Max_keycode is 255
"Macintosh mouse button emulation"	id=7	[XExtensionPointer]
	Type is MOUSE
	Num_buttons is 5
	Num_axes is 2
	Mode is Relative
	Motion_buffer is 256
	Axis 0 :
		Min_value is -1
		Max_value is -1
		Resolution is 1
	Axis 1 :
		Min_value is -1
		Max_value is -1
		Resolution is 1
"Logitech Gaming Mouse G300"	id=8	[XExtensionPointer]
	Type is MOUSE
	Num_buttons is 24
	Num_axes is 2
	Mode is Relative
	Motion_buffer is 256
	Axis 0 :
		Min_value is -1
		Max_value is -1
		Resolution is 1
	Axis 1 :
		Min_value is -1
		Max_value is -1
		Resolution is 1

In this case, the device-name for this mouse is 'Logitech Gaming Mouse G300'. However, the name appears twice --- as type 'KEYBOARD' and type 'MOUSE'. So, in this case, I need to use the ID-number for the mouse ... 8.

To get the default mapping:

Once you determine the DeviceID, you can use the 'get-button-map' command

xinput get-button-map 8

which will display a sequence of integers such as

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24

The length of this sequence will depend on the number of button functions of the mouse.

To get the numbers of the buttons to re-map:

Use the command

xinput test DeviceID

in a terminal window. This command will display 'events' from the specified device. The command starts an endless loop, displaying events received. You can close the terminal window (or use Ctl-C) to end the loop.

For any motion of the mouse/pointer-device and for any action, like a button press, text will appear in the terminal window to indicate the event.

Here is some sample output from 'xinput test 8':

    motion a[1]=-4
    motion a[1]=-4
    motion a[1]=-15
    button press 8
    button release 8
    button press 9
    button release 9
    motion a[0]=0
    motion a[1]=2

When I pressed the buttons labelled 'G4' and 'G5' on the G300 mouse, the 'button press 8' and 'button press 9' text appeared.

If the user plans to assign a function to a button (or other 'protrusion' or 'sensor' or 'wire' of the pointer device), it may not be clear (from the almost useless manufacturer mouse documentation) what number that button/sensor/wire has been assigned. So you can use the 'xinput test DeviceID' command to determine the appropriate 'xinput' numbers corresponding to each button (or 'wire').

Button presses (and other actions) will show a button number. Hence you can determine button numbers for 'protuberances' or 'sensors' or 'wires' of the pointer device.

To change the function-mapping:

Typically you will want to make a little two line script that executes the 'xinput set-button-map DeviceID' command. Also supply the string of numbers for the 'map-list' that will work for you.

Example script to switch the left-and-right button functions, for a left-handed person:

    ## For a left-handed person:
    xinput set-button-map 'mouse-name-or-id-number-goes-here' 3 2 1 4 5 6 7 8 9

You could put these lines in a file named '' in your home directory or in some sub-directory of the home directory.

Then you can call on that script to execute ... from a login or shell 'run control' file --- such as








or ...

where $HOME represents your home directory. Find information for your operating system on which file is best to modify.

There you have it (you Linux users --- and maybe Apple Mac users) ... a way to change the functions of the buttons on your mouse.

Some Text-Paste-Friendly Mice :   (specifications)

Before doing button-mapping experiments with various mice, I collected (below) the pathetic manufacturer's mouse documentation (PDF files) for these mice --- even though their documentation is for the most part useless for determining how to make use of the extra, programmable buttons.

I have included some images of the mice below, to show where the mouse buttons are located.

I also include some 'WEB SEARCH' links, to make it easy to look for additional information on the mice. Who knows. Someone may provide some documentation on how to re-map the buttons on these mice --- even if the manufacturers never do so.

I provide a function re-mapping for 'top-button-text-paste' with the G300 mouse. As I do experiments with the other mice, I will provide suitable mappings (with the 'xinput' command) for those mice as well.

Logitech G300 mouse:
(wired, Model M-U0029, PartNumber 810-002265)

A sample 'top-button-text-paste' re-mapping for both buttons G4 and G5 on the Logitech G300 mouse (which are known to 'xinput' as buttons 8 and 9):

    ## To re-map G300 buttons G4 and G5 to do 'text-paste':
    # xinput set-button-map 'Logitech Gaming Mouse G300' \
    # 1 0 3 4 5 6 7 2 2 10 11 12
    ## Had to use the device-number. Device-name was insufficient.
    xinput set-button-map 8 1 0 3 4 5 6 7 2 2 10 11 12

Note the '2 2' in locations 8 and 9 of the string of mapping integers.

This mapping changes the functions of buttons 8 and 9 ('G4' and 'G5' on the top left of the G300 mouse) to do the '2-function' (paste) --- and deactivates the paste function of the scroll-wheel by using zero in mapping-location 2.

    It will probably be helpful to deactivate the paste-function of the scroll-wheel, because, if you accidentally press too hard on the scroll-wheel, you may cause a 'paste' to occur when you did not want to do that.

NOTE: Pushing down on button 8 or 9 (labelled 'G4' and 'G5' on the G300) to do a paste does not move the mouse sideways --- and I still have the scrollwheel for fast up and down scrolling.

This 'G4' and 'G5' paste works in all three 'profiles' of the G300. (The 'G8' button in the middle of the mouse cycles the mouse through 'red', 'green', and 'blue' profiles. A plastic strip on each side of the mouse glows red, green, or blue.)

'xinput test' does not show button numbers when I press on the two buttons on the right of the G300 (labelled 'G6' and 'G7'), no matter which of the 3 profiles I am in. It looks like I cannot de-activate or re-map those buttons ... with 'xinput'.

They act like 'Ctl-V' and 'Ctl-C' when in 'blue' mode. If one does NOT use 'blue' mode, then one won't accidentally do a paste --- or go into copy-mode --- if one accidentally presses the upper-right buttons of this mouse.

Logitech G402 Hyperion Fury mouse:
(wired, PartNumber 920-004069)

Logitech G502 Proteus Core mouse:
(wired, PartNumber 910-004074)

Logitech Trackman Marble mouse:
(wired, PartNumber 910-000806)

Logitech Trackball M570 mouse:
(wireless, PartNumber 910-003283)

SteelSeries, WorldOfWarcraft, Legendary Edition, mouse:
(wired, PartNumber 62050)

Lots of potential buttons to use to map to
the button-2 function (text paste).

SteelSeries WOW Legendary Edition

An Alternative: SteelSeries WOW Cataclysm Edition

Either (or both) of the circled buttons
on this SteelSeries mouse are possible
candidates for the 'paste text' function.

SteelSeries 3GC USB Rumble PC Game Controller:
(USB cord, PartNumber 69001)

(12 buttons plus D-pad ; dual analog sticks ; vibration feedback)

My intent is to perform some button-remapping-and-paste-text experiments with these mice (pointer devices) --- and report back here with the results.

Bottom of this
page of info on Computer-Mice-for-Text-Pasting (mice with extra, programmable TOP-buttons).

To return to a previously visited web page location, click on the Back button of your web browser, a sufficient number of times. OR, use the History-list option of your web browser.
OR ...

< Go to Top of Page, above. >

Page was created 2015 Sep 18.

Page was changed 2015 Sep 22.
(Added 'xinput' command options info and G300 button re-mapping info.)

Page was changed 2019 Jan 07.
(Added css and javascript to try to handle text-size for smartphones, esp. in portrait orientation.)