diff --git a/rpcs3/rpcs3qt/auto_pause_settings_dialog.cpp b/rpcs3/rpcs3qt/auto_pause_settings_dialog.cpp index 8353cf13a7..cbf56d7d29 100644 --- a/rpcs3/rpcs3qt/auto_pause_settings_dialog.cpp +++ b/rpcs3/rpcs3qt/auto_pause_settings_dialog.cpp @@ -202,6 +202,11 @@ void auto_pause_settings_dialog::OnRemove() void auto_pause_settings_dialog::keyPressEvent(QKeyEvent *event) { + if (event->isAutoRepeat()) + { + return; + } + if (event->key() == Qt::Key_Delete) { OnRemove(); diff --git a/rpcs3/rpcs3qt/debugger_frame.cpp b/rpcs3/rpcs3qt/debugger_frame.cpp index bf1758b036..6ea49240ee 100644 --- a/rpcs3/rpcs3qt/debugger_frame.cpp +++ b/rpcs3/rpcs3qt/debugger_frame.cpp @@ -286,6 +286,9 @@ void debugger_frame::keyPressEvent(QKeyEvent* event) { case Qt::Key_F1: { + if (event->isAutoRepeat()) + return; + QDialog* dlg = new QDialog(this); dlg->setAttribute(Qt::WA_DeleteOnClose); dlg->setWindowTitle(tr("Debugger Guide & Shortcuts")); @@ -335,6 +338,9 @@ void debugger_frame::keyPressEvent(QKeyEvent* event) if (modifiers & Qt::ControlModifier) { + if (event->isAutoRepeat()) + return; + switch (event->key()) { case Qt::Key_G: @@ -356,6 +362,9 @@ void debugger_frame::keyPressEvent(QKeyEvent* event) { case Qt::Key_D: { + if (event->isAutoRepeat()) + return; + if (cpu->id_type() == 2 && g_cfg.core.mfc_debug && !cpu->is_stopped()) { input_dialog dlg(4, "", tr("Max MFC cmds logged"), @@ -426,6 +435,9 @@ void debugger_frame::keyPressEvent(QKeyEvent* event) } case Qt::Key_E: { + if (event->isAutoRepeat()) + return; + if (cpu->id_type() == 1 || cpu->id_type() == 2) { if (!m_inst_editor) @@ -439,16 +451,20 @@ void debugger_frame::keyPressEvent(QKeyEvent* event) } case Qt::Key_F: { - if (cpu->id_type() != 2) - { + if (event->isAutoRepeat()) + return; + + if (cpu->id_type() != 2) return; - } static_cast(cpu)->debugger_float_mode ^= 1; // Switch mode return; } case Qt::Key_R: { + if (event->isAutoRepeat()) + return; + if (cpu->id_type() == 1 || cpu->id_type() == 2) { if (!m_reg_editor) @@ -462,6 +478,9 @@ void debugger_frame::keyPressEvent(QKeyEvent* event) } case Qt::Key_S: { + if (event->isAutoRepeat()) + return; + if (modifiers & Qt::AltModifier) { if (cpu->id_type() != 2) @@ -506,6 +525,9 @@ void debugger_frame::keyPressEvent(QKeyEvent* event) } case Qt::Key_M: { + if (event->isAutoRepeat()) + return; + // Memory viewer idm::make(this, pc, make_check_cpu(cpu)); return; diff --git a/rpcs3/rpcs3qt/debugger_list.cpp b/rpcs3/rpcs3qt/debugger_list.cpp index 46463931d3..30677170ee 100644 --- a/rpcs3/rpcs3qt/debugger_list.cpp +++ b/rpcs3/rpcs3qt/debugger_list.cpp @@ -182,6 +182,10 @@ void debugger_list::keyPressEvent(QKeyEvent* event) case Qt::Key_Down: scroll(-1); return; case Qt::Key_I: { + if (event->isAutoRepeat()) + { + return; + } if (m_cpu && m_cpu->id_type() == 0x55) { create_rsx_command_detail(m_pc, currentRow()); diff --git a/rpcs3/rpcs3qt/gs_frame.cpp b/rpcs3/rpcs3qt/gs_frame.cpp index e68c2bd867..1fccc00fb8 100644 --- a/rpcs3/rpcs3qt/gs_frame.cpp +++ b/rpcs3/rpcs3qt/gs_frame.cpp @@ -149,6 +149,12 @@ void gs_frame::showEvent(QShowEvent *event) void gs_frame::keyPressEvent(QKeyEvent *keyEvent) { + if (keyEvent->isAutoRepeat()) + { + keyEvent->ignore(); + return; + } + // NOTE: needs to be updated with keyboard_pad_handler::processKeyEvent switch (keyEvent->key()) diff --git a/rpcs3/rpcs3qt/main_window.cpp b/rpcs3/rpcs3qt/main_window.cpp index f5de3f38c1..de589d5a28 100644 --- a/rpcs3/rpcs3qt/main_window.cpp +++ b/rpcs3/rpcs3qt/main_window.cpp @@ -2654,6 +2654,11 @@ void main_window::CreateFirmwareCache() void main_window::keyPressEvent(QKeyEvent *keyEvent) { + if (keyEvent->isAutoRepeat()) + { + return; + } + if (((keyEvent->modifiers() & Qt::AltModifier) && keyEvent->key() == Qt::Key_Return) || (isFullScreen() && keyEvent->key() == Qt::Key_Escape)) { ui->toolbar_fullscreen->trigger(); diff --git a/rpcs3/rpcs3qt/pad_settings_dialog.cpp b/rpcs3/rpcs3qt/pad_settings_dialog.cpp index e3f1af600d..35d11a854f 100644 --- a/rpcs3/rpcs3qt/pad_settings_dialog.cpp +++ b/rpcs3/rpcs3qt/pad_settings_dialog.cpp @@ -725,6 +725,11 @@ void pad_settings_dialog::keyPressEvent(QKeyEvent *keyEvent) return; } + if (keyEvent->isAutoRepeat()) + { + return; + } + if (m_button_id <= button_ids::id_pad_begin || m_button_id >= button_ids::id_pad_end) { cfg_log.error("Pad Settings: Handler Type: %d, Unknown button ID: %d", static_cast(m_handler->m_type), m_button_id); diff --git a/rpcs3/rpcs3qt/rsx_debugger.cpp b/rpcs3/rpcs3qt/rsx_debugger.cpp index 67e53fceb3..f4a16e9d39 100644 --- a/rpcs3/rpcs3qt/rsx_debugger.cpp +++ b/rpcs3/rpcs3qt/rsx_debugger.cpp @@ -274,7 +274,7 @@ void rsx_debugger::closeEvent(QCloseEvent* event) void rsx_debugger::keyPressEvent(QKeyEvent* event) { - if (isActiveWindow()) + if (isActiveWindow() && !event->isAutoRepeat()) { switch (event->key()) {