simulate_input
Simulate keyboard and mouse input for automated testing and UI interaction. In Play Mode, keys and mouse reach the game even while the Unity window is in the background.
Category: Test
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
action |
string | yes | "key_tap" |
Type of input action. One of: key_press, key_release, key_tap, mouse_click, mouse_move, mouse_drag, ui_click |
key |
string | Key to press (e.g., ‘Space’, ‘A’, ‘Return’, ‘Escape’) | ||
position |
object | Screen position for mouse actions (origin at bottom-left) | ||
button |
integer | 0 |
Mouse button (0=left, 1=right, 2=middle) | |
selector |
string | U-Selector for UI element to click (for ui_click action) | ||
duration |
number | 0.1 |
Duration in seconds for drag operations |
Example call
Section titled “Example call”The arguments below are the required ones; add the optional ones you need.
{ "name": "simulate_input", "arguments": { "action": "key_press" }}In SuperSave mode
Section titled “In SuperSave mode”When Unity runs with NANORA_MCP_SUPERSAVE=1, call it through the execute meta tool: {"tool": "simulate_input", "args": { … }}. See SuperSave mode.
Source
Section titled “Source”Generated from Assets/NanoraUnityMCP/Editor/Tools/SimulateInputTool.cs (version 1.2.1). The client receives the same schema from tools/list.