xdotool how to do horizontal scrolling?
Asked Answered
D

2

6

I'm writing a bash script to control a browser remotely. So far I have vertical scrolling implemented using

xdotool click 4 //up
xdotool click 5 //down

How can I implement horizontal scrolling using xdotool? I saw numbers 6 and 7 mentioned on some site, but that did not work.

Dissident answered 23/3, 2015 at 21:11 Comment(0)
K
3

Instead of a click, you can send the Left or Right arrow keys:

xdotool key Right
xdotool key Left

Konya answered 5/1, 2016 at 6:38 Comment(1)
Unfortunately, this won't do everytime. For example, on spreadsheets, the selector will just move left/right to the adjacent cell rather than scrolling the whole work space sideways.Neil
A
2

Just use these:

xdotool click 6 # left
xdotool click 7 # right
Ardie answered 25/10, 2020 at 16:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.