From 9a30cfaea75d99529e4c499193018259abd0d1ac Mon Sep 17 00:00:00 2001 From: Boris Yumankulov Date: Wed, 8 Oct 2025 21:09:44 +0500 Subject: [PATCH] chore(keyboard): drop unneded key events Signed-off-by: Boris Yumankulov --- portprotonqt/virtual_keyboard.py | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/portprotonqt/virtual_keyboard.py b/portprotonqt/virtual_keyboard.py index 2388538..7ae8481 100644 --- a/portprotonqt/virtual_keyboard.py +++ b/portprotonqt/virtual_keyboard.py @@ -60,35 +60,6 @@ class VirtualKeyboard(QFrame): } """) - def keyPressEvent(self, event): - if event.key() == Qt.Key.Key_B or event.key() == Qt.Key.Key_Escape: - # Закрываем клавиатуру по нажатию B/Back - if isinstance(self._parent, QWidget): - self._parent.hide() - # Возвращаем фокус на диалог - if self._parent and self._parent.parent(): - dialog_parent = self._parent.parent() - current_focused_field = getattr(dialog_parent, 'current_focused_field', None) - if current_focused_field: - current_focused_field.setFocus() - return - - elif event.key() == Qt.Key.Key_X and not self.gamepad_x_pressed: - self.gamepad_x_pressed = True - self.on_backspace_pressed() - return - - super().keyPressEvent(event) - - def keyReleaseEvent(self, event): - # Обработка отпускания кнопки X геймпада - if event.key() == Qt.Key.Key_X: - self.gamepad_x_pressed = False - self.stop_backspace_repeat() - return - - super().keyReleaseEvent(event) - def highlight_cursor_position(self): """Подсвечиваем текущую позицию курсора""" if not self.current_input_widget or not isinstance(self.current_input_widget, QLineEdit):