I have a Logitech g502 Proteus mouse, and want to use the "Back" and "Forward" mouse buttons (typically used with browser).
I verified with xev that the mouse button presses are detected. I installed xbindkeys and using various online references setup .xbindkeysrc to map the mouse buttons (6 and 7) to press a series of keys to emulate the correct behavior.
"xte 'key t'"
b:6 + Release
"xte 'keydown Alt_L' 'keydown Right' 'keyup Right' 'keyup Alt_L'"
b:7 + Release
The problem, the remap is executed twice, once on press, and once on release. I thought the "Release" modifier would solve this, but it's still ongoing. I verified this by putting in a dummy remap to the letter 't', holding down the mouse button, and seeing one 't' inserted, followed by another 't' on release when I let go.
I did kill all the xbindkeys processes before testing also. running xbindkeys --verbose --nodaemon shows an unusual behavior, in that a press and release are both recorded when I press a mouse button, despite my not releasing the depressed mouse button. The following looks like I pressed and released the button twice, but it was only once:
starting loop...
Button press !
e.xbutton.button=6
e.xbutton.state=16
Button release !
e.xbutton.button=6
e.xbutton.state=16
"xte 'key t' "
Release + m:0x0 + b:6 (mouse)
got screen 0 for window 510
Start program with fork+exec call
Button press !
e.xbutton.button=6
e.xbutton.state=16
Button release !
e.xbutton.button=6
e.xbutton.state=16
"xte 'key t' "
Release + m:0x0 + b:6 (mouse)
got screen 0 for window 510
The xte lines themselves on the command line print only one 't.' Any ideas on how to fix/workaround this?