MQTT General

10 action groups: ManagerAction, MouseAction, KeyboardAction, BrowserControl, ElementAction, ImageAction, OthersAction, EmailAction, DeveloperAction, General Debug

Keyboard → press_key

AI-generated

Summary

Send an MQTT message to press, hold, or release a specific keyboard key via the MQTT General node's Keyboard resource and press_key operation.

Inputs

  • Topic (required) — MQTT topic used for publishing the keyboard action message.
  • QoS — Quality of Service level for the MQTT publish (0, 1, or 2).
  • Include Input Items — Optionally include selected input fields from the prior node's input items in the payload under inputItems.
  • Include Input Items Fields — Defines which fields from prior input items to include if Include Input Items is enabled.
  • Wait For Response — Whether to wait for a response message on a specified response topic before returning output.
  • Response Topic (required) — MQTT topic to subscribe and listen for response messages when Wait For Response is enabled, defaults to RES_.
  • Response Timeout (ms) — Max time in milliseconds to wait for a response message.
  • Parse Response As JSON — Whether to parse the response payload as JSON if possible.
  • Key (required) — The name of the keyboard key to send, e.g., Enter, Tab, Escape, Control+A.
  • Key Type — The type of key action to perform: press, hold, or release.

Output shape

a list of items mirroring the input items with appended mqtt metadata

Output items include a mqtt object in their JSON containing the topic used, the detailed action sent (key and key type), the payload inputs, and if applicable, the response data with topic, raw message, and parsed payload. If Wait For Response is enabled, the node waits until a matching response message is received or times out, otherwise it publishes and continues immediately.

Examples

Example 1: Pressing the Enter key by publishing to the topic 'playwright/keyboard/press' with QoS 1 and no waiting for a response.

Set Topic to 'playwright/keyboard/press', QoS to 1, Key to 'Enter', Key Type to 'press', Wait For Response to false.

Example 2: Holding the Escape key and waiting for a response on topic 'RES_playwright/keyboard/press' with a 10 second timeout.

Set Topic to 'playwright/keyboard/press', Key to 'Escape', Key Type to 'hold', Wait For Response to true, Response Topic defaults to 'RES_playwright/keyboard/press', Response Timeout to 10000 ms.

Links

Discussion