How can I scroll the same specified distance every time with the mouse?

I need to be able to do this within programs such as terminal emulator, notepadqq, or anything involving text.

The reason I need equal scroll distance with the mouse is because when I record and play back macros involving copying and pasting text from a notepad to the paste destination, I need to be able to jump to the next line down/up and have the next line be exactly where the previous line was a second ago.

How do some of you go about this type of situation? Are there better ways of inputting text into website forms other than copy paste?

  • 1
    Why not use arrow keys for the macro, and ignore the mouse wheel?
    – Xen2050
    Apr 12, 2019 at 0:58
  • For what exactly? How would that work within a web browser? Or do you just mean for the text part?
    – Anonymous
    Apr 12, 2019 at 1:18
  • Well, in a web browser, pressing the down arrow key scrolls down a little, and in other text programs it usually moves down a line, isn't that why you're using the mouse wheel? I've got a couple other ideas for programs to try, so might as well answer...
    – Xen2050
    Apr 12, 2019 at 5:45

1 Answer 1


If you're trying to get a window (text or web browser, or generally any window that scrolls) to move down a little at a time, you could use the down arrow key instead of the mouse wheel, usually they both will scroll down. It just might take the arrow key longer to get to the bottom line of a text editing window before it starts scrolling.

"Are there better ways of inputting text into website forms other than copy paste playing"

  • A clipboard manager like clipman for xfce can store lines of text copied to the clipboard, allowing you to activate it with a keyboard shortcut & select whatever line you want to paste. You can pre-load the stored clips by editing the ~/.cache/xfce4/clipman/textsrc file before starting clipman, and even peudo-freeze it by clicking "disable" (in a right-click checkbox) to stop it from adding new copied items.

    clipman example image

  • AutoKey (wikipedia or packages.debian.org) might be useful too.

    AutoKey is a desktop automation utility for Linux and X11. It allows you to manage collection of scripts and phrases, and assign abbreviations and hotkeys to these. This allows you to execute a script or insert text on demand in whatever program you are using.

    AutoKey features a subset of the capabilities of the popular Windows-based AutoHotkey, but is not intended as a full replacement. For a Linux-based implementation of AutoHotkey, see IronAHK. AutoKey's GUI features a number of concepts and features inspired by the Windows program PhraseExpress.

  • A web browser might have it's own form autofill feature, but an extension might autofill forms even better, like Autofill for Google Chrome.

    Form autofill on steroids.

    The Autofill extension serves one purpose: fill form fields automatically on page load without any user interaction. This is its primary function, but it can do so much more. Chrome has a built-in autofill feature, but it doesn't work on all fields and requires you to select from a drop-down menu. Even if you're happy with Chrome's autofill, give this extension a try for more automation and power at your fingertips.

  • 1
    Great answer. On Windows, quick this question is not, I highly recommend AutoIt scripting language above all others, including AutoHotkey (YKmMV)
    – Mawg
    Apr 12, 2019 at 10:44
  • Your giant quoted text of me was a typo.
    – Anonymous
    May 13, 2019 at 5:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.