Run LWJGL 2 Natively on Apple Silicon

Running Minecraft 1.13 and later natively on Apple Silicon Macs isn’t terribly complicated. Since those versions use LWJGL 3 which includes arm64 macOS as a supported platform, you can just download the appropriate version, replace the LWJGL version info in MultiMC, and you’re off to the races. The end of maintenance for LWJGL 2, however, long predates the ARM transition and so getting Minecraft versions prior to 1.13 up and running requries a bit more work.

Fixing Scroll Indicators in Non-Opaque WKWebViews

Update: Since this post was published, the situation has changed and the workaround presented here is no longer valid. See the follow-up.

Here’s a stupid bug I ran into recently: if you’ve got a WKWebView in an iOS app and it shows something that’s not a normal webpage[1], the scroll indicator appearance switching doesn’t work. What I mean by that is, while the indicators appear correctly (with a dark color) when the system is in light mode, they do not take on a light color when dark mode is enabled. This renders the scroll indicators invisible against dark backgrounds, which can be annoying if you’re using the web view to display potentially lengthy content.

M1 Max MacBook Pro Review

Here’s the review, if you’re not going to read any farther than the first sentence: this is a damn good computer. I’ve had my M1 Max MBP (32 GPU cores, 64 GB RAM) for two months now and, aside from the time spent migrating things off my previous computer, it’s been the only “real” computer I’ve used in that time.

Automatically Changing Scroll Direction Based on USB Devices

Last time I wrote about programmatically toggling natural scrolling on macOS and building a menu bar app to let me do that quickly. It works very well, but there’s still a little bit of friction with having to click the menu bar icon—or, more accurately, forgetting to click it and then scrolling backwards and realizing you forgot. As I mentioned at the end of my previous post, one obvious way to extend it, now that the ability to programmatically set direction is in place, would be toggling it automatically based on what’s currently connected. This turned out to not be terribly complicated, but dealing with IOKit was somewhat annoying, so I thought I’d write it up.

A Mac Menu Bar App to Toggle Natural Scrolling

There are two ways you can configure the scroll direction on a computer: normal or inverted (what Apple calls “natural”). If you, like most, use a mouse with a wheel, the normal scrolling scheme is probably what you use. Under it, moving the mouse wheel down (i.e., so that a point on the top of the wheel moves down/closer to you) causes the content to move up and the viewport (the window into the content) to move down. Similarly on a multitouch trackpad, under normal scrolling, as your two fingers move down, the content moves up and the viewport down.

The other option—natural scrolling—flips this, so as your fingers move down on the trackpad, the content moves down and viewport moves up, and similarly for rotating the mouse wheel. When using a mouse, this feels to most people obviously backwards. But this setting doesn’t exist without reason. It’s transposing the paradigm of touchscreens on to the trackpad, where your finger remains pinned to the point in the content where you first touched. You move the content directly, rather than moving the viewport.

This generally isn’t a big deal; most people just find the mode they prefer, change the setting, and then never touch it again. But what if you prefer both?