X stops at a very low level. Scroll Wheel events in X are treated as button presses. There's no X API call to get a "scroll by this much" per Button4 or Button5 events. It wouldn't even make sense in the context. All of that is handled by libraries above the X level.
Keyboard, mouse, touchscreen, etc.