How to reach end of page with xdotool, how to page up and down

nightcod3r picture nightcod3r · Oct 31, 2014 · Viewed 10k times · Source

How can I command a window to go to end of page with xdotool?

  • "key End" seems to send and End keystroke, but nothing happens: xdotool selectwindow key End

  • "click 5" scrolls down, but how to know if the page has reached the end?

Also, the PageUp and PageDown keys doesn't seem to be accepted.

run on Ubuntu 12.04

Answer

earthling42 picture earthling42 · Aug 13, 2015

xdotool is finicky about page up and page down. It doesn't recognize 'PgUp' or 'PageUp' or 'Page-Up'. What seems to work:

xdotool key Page_Up

and

xdotool key Page_Down