From bdc9e9cce39354f853c4589c0da94141aac3f473 Mon Sep 17 00:00:00 2001 From: Matija Kecman Date: Sat, 4 Jul 2026 07:39:53 -0700 Subject: [PATCH] Fix bug where backspace intended for an imgui widget reset the environment PiperOrigin-RevId: 942496281 Change-Id: I8c5d315d22a7c01dbe69f19833964f25141e9663 --- python/mujoco/experimental/studio/studio_app_events.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/mujoco/experimental/studio/studio_app_events.py b/python/mujoco/experimental/studio/studio_app_events.py index a60924e3..017a4673 100644 --- a/python/mujoco/experimental/studio/studio_app_events.py +++ b/python/mujoco/experimental/studio/studio_app_events.py @@ -188,6 +188,8 @@ def handle_reset_keyboard_events( model: mujoco.MjModel, data: mujoco.MjData ) -> bool: """Handles keyboard shortcuts for simulation reset.""" + if imgui.GetIO().WantCaptureKeyboard: + return False if imgui.IsKeyChordPressed(imgui.Key.Backspace): if model is not None and data is not None: