Maybe just run on an A18Pro instead of one of the M processors. If you're not needing a screen, I think the actual box could be quite small too. Maybe the size of an iPhone. One or two USB ports.
I guess you could build it into a keyboard if you wanted to, but I don't like the apple keyboards so that would be a downside for me.