I would like to emulate mouse scrolling through a keyboard shortcut. What I mean by that is whether I have a browser or terminal open, I want to be able to scroll through it exactly the same way I would scroll using my mouse.
I know that many terminals allow to scroll using Ctrl+Page Up/Down
, however it still would not be what I'm looking for, as I need single line scroll, working not only in a terminal but in all of the applications. I have a trackpad which supports scrolling on my laptop and a USB mouse which also supports scrolling.
I am using Ubuntu Linux LTS 14.04.
Best Answer
You can inject input events with xdotool. You can invoke commands on a key press with xbindkeys. Put something like this in your
~/.xbindkeysrc
: