ok here's the code https://github.com/carcinization/qmk_firmware/tree/devbranch/keyboards/reviung41/keymaps/sevanteri_tb_via
heavily based on sevanteri's trackball code
the trackball is a pimoroni trackball breakout and the board is a panda41, based on the reviung41 which is open source