I'm currently trying to implement keyboard input from the Roku companion app (tested iOS and from commandline) into a custom application (note - this is a legacy app and is not using Scenegraph). I am using a Roku 4 with 7.1 firmware.
Within the event loop whenever a keypress is sent I am using that value to calculate the ascii of the character being pressed.
So something like:
if type(msg) = "roUniversalControlEvent" then
keyID = msg.getInt()
.
.
.
end if
The problems I have found are
- ascii presses conflict with other presses - for example the OK button being released is 106 which is also lowercase j. (this can be worked around by taking the release IDs - values ranging from 132 - 227 and deducting 100 to get the ascii value)
- when q or z are pressed I am receiving the exact same keyIDs. I have also tested this on the command line. So:
curl -d '' http://<MY_IP>:8060/keypress/Lit_q
and
curl -d '' http://<MY_IP>:8060/keypress/Lit_z
Both come up with keyIDs of 113 (press) and 213 (release).
Has anyone else successfully implemented text input from the companion app? Have I implemented this correctly?
The documentation I used was from:
https://sdkdocs.roku.com/display/sdkdoc ... sKeyValuesThanks in advance.