Carl Henriksson

Firmware, systems, web. Same problems, different layers.


MOTR is an open-source aftermarket firmware for the Polarity Works ROTR, built on upstream ZMK. It provides mouse scroll on the encoder, left, middle, and right click on the buttons, RGB underglow, and Bluetooth. Download · GitHub


The ROTR is a precision scroll knob. A high-resolution magnetic encoder, three buttons, and nothing else.

The hardware is well suited for mouse wheel input. Fine, continuous movement is exactly what a 16-bit absolute encoder is good at. Out of the box it ships with firmware that maps the encoder to keyboard keys—a reasonable default for many workflows, but one that leaves the mouse wheel use case on the table.

A keyboard key either fires or it doesn’t, but an encoder with 65536 positions per revolution deserves better.

No aftermarket firmware existed in sync with current upstream ZMK, so MOTR was built to fill that gap.

The MA730 reports absolute position—it always knows where it is, not how far it has moved. ZMK expects the opposite, so that gap had to be bridged cleanly in firmware without patching ZMK itself.

Getting the encoder to behave like a scroll wheel required handling a few edge cases. Wrap-around at the position boundary could produce large deltas in the wrong direction, small oscillations around rest positions showed up as jitter, and the initial reading on boot was often arbitrary. Each case had to be accounted for so that only deliberate, meaningful movement produced scroll input.

The driver ended up as a self-contained Zephyr module. No forks, no patches to carry, just a clean addition on top of upstream ZMK. USB and Bluetooth both work. RGB underglow works. The encoder is fully unlocked.