I’m probably misunderstanding as I rarely use word processing software, so I apologise if you talking about something more than the system’s own handling of touchpad scrolling! here’s the settings applet for XFCE, I think every DE will have similar options (it does even offer circular scrolling, but I know you aren’t looking for that):
I’ve been stuck repeatedly asking myself this question ever since reading your comment 😩 Please be careful about throwing infinite
while true
loops around! Now I need someone to Ctrl-C me.