Is there a utility I could use to scroll the active window horizontally using the keyboard?

  • 2
    I am not sure if this is a duplicate of this question. However, it is worth looking into. unix.stackexchange.com/questions/111386/… – Ramesh Aug 20 '14 at 14:48
  • @Ramesh The op there wants to alter the behavior of the scroll wheel on his mouse. I don't want to use the mouse at all, just the keyboard. – Aryeh Leib Taurog Aug 21 '14 at 9:11
  • Make sure to accept the answer if it was helpful – Gray Jun 29 '18 at 14:49

Install xbindkeys and xautomation. Edit ~/.xbindkeysrc.scm and write:

; bind (Windows key + arrows) to horizontal scroll events
(xbindkey '(mod4 Left)  "xte 'mouseclick 6'")
(xbindkey '(mod4 Right) "xte 'mouseclick 7'")

Run xbindkeys

If you want to use a different set of keys, use xbindkeys --multikey to find out the codes.


  • Awesome! Thanks. For some reason xte 'mouseclick 6' and xte 'mouseclick 7' don't work for me. This did the trick: xte 'keydown Shift_L' 'mouseclick 4' 'keyup Shift_L'. It's not a complete solution, though, because it only works if the mouse is over the window in question. – Aryeh Leib Taurog Jun 22 '17 at 14:10
  • @AryehLeibTaurog So... will you accept my answer? – tfga Jun 23 '17 at 1:56

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.