Keyboard

Keyboards are input devices, which must be claimed in order to receive scan event information.
Key press information is reported inside the usual POST requests from the client to the server, and can be claimed and released through the server response.
Inside the JSON POST, a “keyboard” field will provide an array of JSON objects in the following format:
{
    "name": "<device logical name>",
    "status": { "connected": bool, "claimed": bool },
    "keyPresses": "<key presses since last poll>"
}
  • “name”
    specifies a logical device name to uniquely identify the keyboard.
    This name may be used to claim the keyboard in order to receive key press events.
  • “status”
    an object describing the device status, containing two fields:
    • “connected”
      a Boolean value, true if the keyboard is physically connected and false otherwise.
    • “claimed”
      true if the device is claimed by CloudPRNT, meaning key press events will be reported to this server.
  • “keyPresses”
    a base64 encoded string providing the sequence of key presses since the last POST.
    Key presses are already converded from keyboard scan codes to Ascii data.