Environment: Windows 11, Unity 6000.3.25f1, unity CLI 1.0.0-beta.17, com.unity.pipeline 1.0.1, com.unity.inputsystem 1.20.0 (only input handler), Git Bash.
Steps
- Open a scene with a runtime UI Toolkit panel whose root registers a KeyDownEvent callback that logs the key.
- unity command editor.playmode start; check that Application.isFocused is true.
- unity command runtime simulate_key --key Alpha1 (see unity command runtime for the exact flags).
- unity command console get.
Actual
Exit 0. An InputSystem.onEvent counter sees the key; the panel receives no KeyDownEvent.
Expected
The panel receives the key, or the command fails and says that key events do not reach UI Toolkit.
Cause found
With the Input System, InputForUI builds key and text events from the IMGUI event queue, which a state event on Keyboard.current never enters. Whether a simulated key reaches polling input (wasPressedThisFrame) was not re-tested.