Minimise Window Shortcut [new] -
def setup_shortcut(self): """Register global or local shortcut""" if self.global_mode: keyboard.add_hotkey(self.shortcut, self.minimize_window) else: self.root.bind_all(f"<{self.shortcut}>", lambda e: self.minimize_window())
def minimize_window(self): """Minimize the main window""" self.root.iconify() # Minimize to taskbar # Alternative: self.root.overrideredirect(True) for custom minimize def change_shortcut(self, new_shortcut): """Dynamically change the shortcut""" keyboard.remove_hotkey(self.shortcut) self.shortcut = new_shortcut keyboard.add_hotkey(self.shortcut, self.minimize_window) return f"Shortcut changed to {new_shortcut}" minimise window shortcut
## Minimize Window Shortcut Feature : Ctrl + Alt + M (Windows/Linux) or Cmd + M (macOS) self.minimize_window) else: self.root.bind_all(f"<