xdotool how to do horizontal scrolling?

Ale*_*one 6 bash shell mousewheel horizontal-scrolling xdotool

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
Run Code Online (Sandbox Code Playgroud)

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

小智 3

您可以发送向左或向右箭头键,而不是单击:

xdotool key Right
xdotool key Left