This patch adds support for mice and trackballs with more than 3 (emulated 5) buttons under X11.
The patch allows trackballs to use two more programmable (or mappable) buttons to enable e,g, vertical scrolling events. This allows a trackball (or mouse with additional buttons) to use two movement directions with one physical button and the ball translation.
Tested with a Logitech Marble Mouse, others should work fine, too.