The computer mouse scroll wheel is a quadrature rotary encoder . It generates different data for forward scrolling and backward scrolling. For forward- 00, 10, 11, 01, 00 ......repeat (red led blink )
For backward- 00, 01, 11, 10, 00 ....repeat (green led blink)
Watch it's demo on YouTube , it's a different circuit but same output https://youtu.be/1qvjSxJ8R-Y