In windows I used X-Mouse Button Control to accomplish this, but I can't find a method of doing It in linux.

My main mouse is a logitech m510 which has two thumb buttons on the side, which are buttons 8 and 9.

the closest i've gotten is by using xbindkeys and xte.


"xte 'key Up'"
    b:9 + Release

"xte 'key Down'"
    b:8 + Release

But I want continuous scrolling when I press the button, not just one key movement when I press and release the button... Help?

  • I'm also looking for the same thing... This is the closest i've come up with, but i have yet to get it to actually repeat! I suspect there's something wrong with the shell script. My .xbindkeysrc: " while { xinput --query-state 9 | grep -q "12\]=down"; }; do xte 'mousedown 4' 'sleep 1' 'mouseup 4' ; done " b:12 – Iestyn ap Mwg Jan 17 '18 at 22:40

Looking for the same thing (see comment). This does work, though: .xbindkeysrc:

" ~/src/but_10.sh "

and but_10.sh:

xte 'key Up'
sleep 0.3
while [ $(xinput --query-state 9 | grep -e "button\[10\]=down") ]
xte 'key Up'
sleep 0.05

No idea why this works, while xte 'mouseclick 4' doesn't. I'd REALLY like to get it to work that way.

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.