Mouse Wheel Emulation on Mac – How to Set Up

macosmouse

I've recently moved into an office that has standardized on Apple computers and have run into something that I have used with Linux that I know is going to drive me nuts on the Mac. I use a Logitech MarbleMouse, a trackball that does not have a mouse wheel. On Linux, there is a configuration option (EmulateWheel and EmulateWheelButton in evdev) that let's you press a button and have mouse/trackball motion act like a scroll wheel. Is there anything equivalent on Mac?

Best Answer

You can use KeyRemap4MacBook.

Scroll by moving the pointer while holding the secondary button:

<autogen>__PointingRelativeToScroll__ PointingButton::RIGHT</autogen>

Scroll by moving the the pointer while holding F1:

<autogen>__KeyToKey__ KeyCode::F1, KeyCode::VK_MODIFIER_EXTRA1</autogen>
<autogen>__PointingRelativeToScroll__ PointingButton::NONE, ModifierFlag::EXTRA1</autogen>

Scroll with F1 and F2:

<autogen>__KeyToKey__ KeyCode::F1, KeyCode::VK_MOUSEKEY_SCROLL_UP</autogen>
<autogen>__KeyToKey__ KeyCode::F2, KeyCode::VK_MOUSEKEY_SCROLL_DOWN</autogen>

Scroll by moving the pointer while holding the primary and secondary buttons:

<autogen>__SimultaneousKeyPresses__ PointingButton::LEFT, PointingButton::RIGHT,
KeyCode::VK_CONFIG_SYNC_KEYDOWNUP_notsave_pointing_relative_to_scroll</autogen>

See the source for the key code values and predefined settings.