1

in Ubuntu 20.04 LTS i try to customize my logitech mx master 3 mouse buttons with xbindkeys

I edit the settings in

~/.xbindkeysrc

something like this works fine for bottons 8 and 9 :

# Mouse Button #8 
"nautilus"
    b:8

# Mouse Button #9
"firefox"
    b:9

but i need to assign copy command to button 8 and paste command to button 9, instead of opening applications.

Does somebody have an idea about how to do tell "copy" or "paste" to xbindkeys ?

2 Answers2

3

use for my logitech m500:

#CTRL + C
"xte 'keydown Control_L' 'key c' 'keyup Control_L'"
b:8

#CTRL + V
"xte 'keydown Control_L' 'key v' 'keyup Control_L'"
b:9
Mihail
  • 31
  • 2
  • It works fine with logitech mx master 3 also, thanks – Laurent GREMET Nov 19 '20 at 15:24
  • Great answer. If you want to figure out which buttons are which on your mouse you can install `xorg-xev` and run `xev`. It will present a small window that logs all mouse events to console output. You can press the button and get a button press and release event that will tell you the button number. – Ben Mordecai Jun 29 '23 at 12:39
0

with xdotool

#copy
"xdotool key ctrl+c"
b:8

#paste 
"xdotool key ctrl+v"
b:9

Paste is more used that copy so assign to the button most easily reachable. I have everything in one button but thats another history

ltapia
  • 3
  • 1
  • 2
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Apr 25 '23 at 01:38