5

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

3
  • 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, 2014 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. Aug 21, 2014 at 9:11
  • Make sure to accept the answer if it was helpful
    – Gray
    Jun 29, 2018 at 14:49

1 Answer 1

2

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.

References:

2
  • 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. Jun 22, 2017 at 14:10
  • @AryehLeibTaurog So... will you accept my answer?
    – tfga
    Jun 23, 2017 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.