X11 has two mechanisms for reporting scroll events. The old-fashioned way is to access the scroll wheel in the form of two additional mouse buttons: scrolling up is reported as button 4 and scrolling down as button 5 (or vice versa, I donβt remember). The modern way is to report them through the XInput2 extension, which allows you to use functions such as horizontal scrolling and smooth scrolling, etc.
source share