Skip to main content

Module system_keyboard

Module system_keyboard 

Source
Expand description

The system’s own keyboard for a text box (ticket 3003): a console’s, or Steam’s on-screen one on the Steam Deck. A screen asks for it through Ctx::system_keyboard, the platform’s App opens it (shuyi_platform::TextInput), and the player’s answer comes back in a later frame. Where the platform has none, a screen reads typed keys (FrameInput::text) or spells on a letter grid, as before.

The handshake, one frame at a time:

  1. before each frame the platform says whether it has a keyboard (set_present);
  2. a screen asks;
  3. after the frame the platform takes the ask (take_ask) and opens its keyboard;
  4. once the player closes it, the platform hands back the answer (answer) before a frame, and the screen takes it (take_answer).

Structs§

SystemKeyboard
The system keyboard as the screens see it: whether there is one, the ask waiting for the platform and the answer waiting for the screen. Absent until the platform says otherwise.
TextAsk
What a text box asks the system keyboard for.

Enums§

TextAnswer
What the player did with the system keyboard.