Lightning cables, as in the cables that charged proprietary Apple charging ports, ran a stripped-down version of iOS. Ran. Software. On a tiny chip. Someone got DOOM running on a Lightning-to-HDMI cable. A MacBook was used to flash the code to the cable, and a monitor was used at the other end to display the output, but apparently the game itself was running on the cable alone.
A mouse is much bigger.
Chips can be a lot smaller than people think.