Did you read the documentation? It's not for receiving button presses from the remote control.
"An roInput object can be used to receive events sent from a network client using the External Control Protocol (ECP), as described in External Control API."
The reason you only see invalid events is because the wait statement times out before any events are received. If you want to wait forever you should have wait(0, msgPort). Your loop is going to be printing the invalid events twice a second.
Roku Community Streaming Expert
Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.
I am not a Roku employee.