From 0ff66e282bf4d4a48438e1a77065307400679f12 Mon Sep 17 00:00:00 2001 From: Boris Yumankulov Date: Sun, 24 Aug 2025 22:10:39 +0500 Subject: [PATCH] fix(input_manager): enable Escape key to close dialogs Signed-off-by: Boris Yumankulov --- portprotonqt/input_manager.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/portprotonqt/input_manager.py b/portprotonqt/input_manager.py index 3e24cc2..19b7de8 100644 --- a/portprotonqt/input_manager.py +++ b/portprotonqt/input_manager.py @@ -874,10 +874,13 @@ class InputManager(QObject): self.file_explorer.previous_dir() return True - # Close AddGameDialog with Escape - if key == Qt.Key.Key_Escape and isinstance(popup, QDialog): - popup.reject() - return True + # Close Dialogs with Escape + if key == Qt.Key.Key_Escape: + if isinstance(focused, QLineEdit): + return False + if isinstance(active_win, QDialog): + active_win.reject() + return True # FullscreenDialog navigation if isinstance(active_win, FullscreenDialog):