Mode select
Combined mode works almost like ratchet wheel when moved slowly (displacement amount is in fixed region) and like touchpad when moved fast.
Accumulating travel distance and emitting scroll of fixed size for every unit distance.
Every movement is translated into scroll event.
Input processing
Touchpad emulation
Ratched wheel emulation
State

left mouse button drag - scroll emulation; mouse scroll - actual scroll

Locked mouse mode is active! Press Esc when done with scrolling emulation.