Open source all you want! It doesn't change the fact that they're spying the contents of your screen no matter what input is being used with Automatic Content Recognition (ACR) technology
Roku remotes are sophisticated devices. There are many models, so features vary, but among the possible features are 3.5mm audio output, Bluetooth audio, voice command input, Wi-Fi, infrared, battery charger and other things. Clearly a substantial MCU is present and thus, an RTOS.
Pretty sure they don't have gyroscopes and accelerometers anymore, but they did early on. It was basically a Wii Mote and I played a ton of Angry Birds on my TV.
You can probably do it with a keyboard paired to a server/RPi that emits the keystrokes to the Roku ECP API, if having that second device is acceptable.
On my rokus, I am able to use my phone as a remote via the roku app. This includes typing on mobile via my phone's keyboard. Makes logging into things much easier.
https://docs.roku.com/published/acrservicepolicy/en/CA
And much, much better, as well
Why does a remote control require a RTOS?