2

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.

~/.xbindkeysrc:

#scroll-up-attempt
"xte 'key Up'"
    b:9 + Release

#scroll-down-attempt
"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?

1
  • 1
    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 Jan 17, 2018 at 22:40

2 Answers 2

1

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

" ~/src/but_10.sh "
b:10

and but_10.sh:

#!/bin/bash
xte 'key Up'
sleep 0.3
while [ $(xinput --query-state 9 | grep -e "button\[10\]=down") ]
do
xte 'key Up'
sleep 0.05
done

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

1
  • @lestyn ap Mwg are you still looking for a way to achieve mouseclick 4/5?
    – mohkamfer
    Jan 3 at 22:18
0

@mohkamfer Yes, if you have found a way to make that work. I'm still using the workaround i listed, using 'key Up' and 'key Down'. I would prefer to emulate the scroll wheel.

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.