Update controller/main.py

This commit is contained in:
elias 2025-04-03 07:58:07 +02:00
parent 9a4e60422d
commit b92c075e88

View File

@ -71,6 +71,12 @@ class RobomasterUI:
master.bind("<KeyRelease-q>", lambda event: self.chassis_move_arrow(z=0) if event.keysym == 'q' else None)
master.bind("<KeyRelease-e>", lambda event: self.chassis_move_arrow(z=0) if event.keysym == 'e' else None)
master.bind("<space>", lambda event: self.stop_chassis())
master.bind("<Button-1>", self.deselect_textbox)
def deselect_textbox(self, event):
focused_widget = self.master.focus_get()
if isinstance(focused_widget, tk.Entry) and event.widget != focused_widget:
self.master.focus_set()
def _run_command(self, func, *args, **kwargs):
self._command_executor(func, *args, **kwargs)