2D scrolling with PowerBook/MacBook trackpad or Mighty Mouse?

Hi,

I would like to support two-dimensional scrolling with the Mighty Mouse trackball and the PowerBook scrolling trackpad, but I cannot figure out how to do it.

I tried to use AWT event handlers, but Apple’s JRE only posts MouseWheelEvents for the vertical scroll component, and the listener is completely idle when only the horizontal component is non-zero.

(It’d be great if I could also provide cross-platform support for those PC mice that support horizontal scrolling action as well by rocking the mouse wheel right or left, but I can do without that for now.)

When i ran the controller test, I noticed that the “Apple Optical Mouse” has a Z axis that is controlled by horizontal movement on the trackball, but there is no axis to detect vertical motion (i.e. typical mouse wheel events). For the internal keyboard/trackpad, JInput could detect X and Y finger movement, but there was nothing to indicate whether the user had one finger down (mouse movement) vs. two fingers down (scrolling).

If there’s a way to make this work using JInput, I’d really appreciate your help.

Thanks!
Corey