Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 7296  / 1 Year ago, sun, january 8, 2023, 10:51:42

I am running Ubuntu 16.04 and have connected Logitech M705 mouse. This mouse has a total of 10 buttons, button 1 being left click, button 2 right click, button 10 "thumb button".



I have set up xbindkeys



# History Back & Forward
"xte 'keydown Alt_L' 'key Left' 'keyup Alt_L' "
b:6 + Release
"xte 'keydown Alt_L' 'key Right' 'keyup Alt_L' "
b:7 + Release

# page down
"xte 'key Next' "
b:8

# page up
"xte 'key Prior' "
b:9

# powerclick
"xte 'keydown Control_L' 'mouseclick 1' 'keyup Control_L' "


This all works very well. What I call powerclick is used to open links in FF in new tab.



Now what I would like to achieve: when I click button 1 THEN button 10 THEN I select some text and I release both buttons, text should be copied into clipboard. So kind of a quickedit mode for any window, as soon as text is selected this way, it is copied.



# quickcopy
"xte 'keydown Control_L' 'key c' 'keyup Control_L' "
b:10 + b:1 + Release


But this does not do the desired effect.



Is there a way to map such complex conditions? I can imagine this being of a great use, considering that the "thumb button" might work similarly to Ctrl key on keyboard, i.e. to modify standard click behavior.



Later Id like to make Paste function for button 10 (thumb button) + button 2 (Right button)



Thanks


More From » keyboard

 Answers
7

Running xbindkeys -n -v in a terminal outputs:



1 keys in /home/whoever/.xbindkeysrc

min_keycode=8 max_keycode=255 (ie: know keycodes)
"xte 'keydown Control_L' 'key c' 'keyup Control_L' "
Release + m:0x0 + b:1 (mouse)
starting loop...


As I think m:0x0 is a mouse state, seems like xbindkeys is interpreting b:10 + b:1 + Release as simply b:1 + Release.



I don't know if we are doing it wrong and there is a correct way of writing it, or if using a two-mouse-button combination is simply not possible in xbindkeys.


[#13503] Tuesday, January 10, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
hirtieve

Total Points: 207
Total Questions: 104
Total Answers: 114

Location: Cook Islands
Member since Thu, May 21, 2020
4 Years ago
;