A remote controller script can press 14 gamepad buttons and move sticks. It
cannot produce a character. That stops it short at any text field in an
experience, which is where a remote operator most often gets stuck.
Add text and named key support to the stream route of issue 1155.
Stream route only. The grid route has no text entry, so a text step with no
live stream is refused with a log line that says why, exactly as an unusable
button is today.
A step gains two optional fields beside the existing buttons and axes:
{"text": "hello world", "hold_milliseconds": 50}
{"key": "enter", "hold_milliseconds": 50}
{"key": "a", "modifiers": ["control"], "hold_milliseconds": 50}
text is typed through LiSendUtf8TextEvent. key is a named key pressed and
released through LiSendKeyboardEvent, which the fork already uses in
StreamView.m with Windows virtual key codes.
Arrow keys must not be called up, down, left or right. Those names
already mean d-pad buttons in this vocabulary. Use arrow_up and so on, or the
collision will silently turn a keyboard step into a gamepad step.
A script travels as JSON through POST /api/v1/heads/{id}/input, is held in the
cluster's memory, and is printed by scripts/send-controller-input.sh. A
password sent this way lands in all three. The issue log of this tracker is
public, and credentials have leaked into it before.
So the runbook must say plainly that this is for menus, search boxes, chat and
in-game text, and never for a password. Account credentials remain what #1119
decided: store the session on the body, no credential handling.