Remix.run Logo
LoganDark 7 hours ago

The arrow keys do scroll smoothly in Safari from my testing, but a clickwheel does not. Probably because scrolling inputs are meant to be precise.

scottlamb 5 hours ago | parent [-]

macOS is a whole thing in terms of smooth scrolling, or HID (human interface devices) in general. It seems like Apple just doesn't put a lot of effort in terms of working with third-party HIDs:

* There's a standard way to enable high-resolution scroll reporting (pixel-level instead of line-level), but Apple doesn't use it.

* There's a standard approach to multi-touch digitizers/trackpads (documented and I think to some extent created by Microsoft, called PTP) which Apple doesn't support.

* Apple's own Magic Trackpad speaks a proprietary protocol and it appears you can only speak it if you claim to use their USB VID/PID. And I don't think doing that would go over well in a commercial product. (And if you do manage to speak it, it turns out their driver really doesn't do two-finger scrolling well with tiny trackpads anyway. They probably only tested it on the generous dimensions of their hardware.) (Also, it attaches to your entire device, so having an additional interface with a different driver doesn't appear to work either.)

But...you can inject smooth scrolling events via Core Graphics. So you can run a userspace program with accessibility permission that scrolls smoothly. And you can also communicate with USB devices from such a program. There are some existing programs for doing smooth scrolling with standard mice (Mac Mouse Fix is one). I'm writing a userspace driver for PTP to make my keyboard's built-in trackpad work properly.

LoganDark 3 hours ago | parent [-]

Last I checked, high-resolution scroll reporting over USB is not based on pixels but on fractions of a detent, which is annoying to say the least. Apple probably also didn't want to translate multitouch to scroll in hardware, since scrolls are not reported the same in all contexts (e.g. applications can choose whether it locks to an axis; which axes it can lock to depends on the capabilities of the view; etc.)

> But...you can inject smooth scrolling events via Core Graphics.

Applications can choose to ignore synthetic events, IIRC. Probably not an issue for scrolling, but for instance Little Snitch can be configured to ignore synthetic inputs to its security settings.