Browse files

[Mac] Fix Mouse.GetState() h-wheel

External mice will now report horizontal scrolling in the low-level
`Mouse.GetState()` API. The touchpad apparently creates an emulated
mouse device that does not report horizontal wheel scrolling events.

Touchpad support probably requires a proper multitouch implementation.
  • Loading branch information...
1 parent 5e63c5f commit 8373782fad3d9c06ec2f019cdad58c39918e9cc7 @thefiddler thefiddler committed Jun 10, 2014
Showing with 5 additions and 0 deletions.
  1. +5 −0 Source/OpenTK/Platform/MacOS/HIDInput.cs
5 Source/OpenTK/Platform/MacOS/HIDInput.cs
@@ -413,6 +413,11 @@ static void UpdateMouse(MouseData mouse, IOHIDValueRef val)
mouse.State.Y += v_int;
+ case HIDUsageGD.Z:
+ // Horizontal scrolling for apple mouse (old-style with trackball)
+ mouse.State.SetScrollRelative(v_int, 0);
+ break;
case HIDUsageGD.Wheel:
mouse.State.SetScrollRelative(0, v_int);

0 comments on commit 8373782

Please sign in to comment.