mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-03-29 22:20:48 +00:00
Qt: add missing key auto repeat checks
This commit is contained in:
parent
d3ff67ffb5
commit
35a380676e
@ -202,6 +202,11 @@ void auto_pause_settings_dialog::OnRemove()
|
|||||||
|
|
||||||
void auto_pause_settings_dialog::keyPressEvent(QKeyEvent *event)
|
void auto_pause_settings_dialog::keyPressEvent(QKeyEvent *event)
|
||||||
{
|
{
|
||||||
|
if (event->isAutoRepeat())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (event->key() == Qt::Key_Delete)
|
if (event->key() == Qt::Key_Delete)
|
||||||
{
|
{
|
||||||
OnRemove();
|
OnRemove();
|
||||||
|
@ -286,6 +286,9 @@ void debugger_frame::keyPressEvent(QKeyEvent* event)
|
|||||||
{
|
{
|
||||||
case Qt::Key_F1:
|
case Qt::Key_F1:
|
||||||
{
|
{
|
||||||
|
if (event->isAutoRepeat())
|
||||||
|
return;
|
||||||
|
|
||||||
QDialog* dlg = new QDialog(this);
|
QDialog* dlg = new QDialog(this);
|
||||||
dlg->setAttribute(Qt::WA_DeleteOnClose);
|
dlg->setAttribute(Qt::WA_DeleteOnClose);
|
||||||
dlg->setWindowTitle(tr("Debugger Guide & Shortcuts"));
|
dlg->setWindowTitle(tr("Debugger Guide & Shortcuts"));
|
||||||
@ -335,6 +338,9 @@ void debugger_frame::keyPressEvent(QKeyEvent* event)
|
|||||||
|
|
||||||
if (modifiers & Qt::ControlModifier)
|
if (modifiers & Qt::ControlModifier)
|
||||||
{
|
{
|
||||||
|
if (event->isAutoRepeat())
|
||||||
|
return;
|
||||||
|
|
||||||
switch (event->key())
|
switch (event->key())
|
||||||
{
|
{
|
||||||
case Qt::Key_G:
|
case Qt::Key_G:
|
||||||
@ -356,6 +362,9 @@ void debugger_frame::keyPressEvent(QKeyEvent* event)
|
|||||||
{
|
{
|
||||||
case Qt::Key_D:
|
case Qt::Key_D:
|
||||||
{
|
{
|
||||||
|
if (event->isAutoRepeat())
|
||||||
|
return;
|
||||||
|
|
||||||
if (cpu->id_type() == 2 && g_cfg.core.mfc_debug && !cpu->is_stopped())
|
if (cpu->id_type() == 2 && g_cfg.core.mfc_debug && !cpu->is_stopped())
|
||||||
{
|
{
|
||||||
input_dialog dlg(4, "", tr("Max MFC cmds logged"),
|
input_dialog dlg(4, "", tr("Max MFC cmds logged"),
|
||||||
@ -426,6 +435,9 @@ void debugger_frame::keyPressEvent(QKeyEvent* event)
|
|||||||
}
|
}
|
||||||
case Qt::Key_E:
|
case Qt::Key_E:
|
||||||
{
|
{
|
||||||
|
if (event->isAutoRepeat())
|
||||||
|
return;
|
||||||
|
|
||||||
if (cpu->id_type() == 1 || cpu->id_type() == 2)
|
if (cpu->id_type() == 1 || cpu->id_type() == 2)
|
||||||
{
|
{
|
||||||
if (!m_inst_editor)
|
if (!m_inst_editor)
|
||||||
@ -439,16 +451,20 @@ void debugger_frame::keyPressEvent(QKeyEvent* event)
|
|||||||
}
|
}
|
||||||
case Qt::Key_F:
|
case Qt::Key_F:
|
||||||
{
|
{
|
||||||
if (cpu->id_type() != 2)
|
if (event->isAutoRepeat())
|
||||||
{
|
return;
|
||||||
|
|
||||||
|
if (cpu->id_type() != 2)
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
static_cast<spu_thread*>(cpu)->debugger_float_mode ^= 1; // Switch mode
|
static_cast<spu_thread*>(cpu)->debugger_float_mode ^= 1; // Switch mode
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
case Qt::Key_R:
|
case Qt::Key_R:
|
||||||
{
|
{
|
||||||
|
if (event->isAutoRepeat())
|
||||||
|
return;
|
||||||
|
|
||||||
if (cpu->id_type() == 1 || cpu->id_type() == 2)
|
if (cpu->id_type() == 1 || cpu->id_type() == 2)
|
||||||
{
|
{
|
||||||
if (!m_reg_editor)
|
if (!m_reg_editor)
|
||||||
@ -462,6 +478,9 @@ void debugger_frame::keyPressEvent(QKeyEvent* event)
|
|||||||
}
|
}
|
||||||
case Qt::Key_S:
|
case Qt::Key_S:
|
||||||
{
|
{
|
||||||
|
if (event->isAutoRepeat())
|
||||||
|
return;
|
||||||
|
|
||||||
if (modifiers & Qt::AltModifier)
|
if (modifiers & Qt::AltModifier)
|
||||||
{
|
{
|
||||||
if (cpu->id_type() != 2)
|
if (cpu->id_type() != 2)
|
||||||
@ -506,6 +525,9 @@ void debugger_frame::keyPressEvent(QKeyEvent* event)
|
|||||||
}
|
}
|
||||||
case Qt::Key_M:
|
case Qt::Key_M:
|
||||||
{
|
{
|
||||||
|
if (event->isAutoRepeat())
|
||||||
|
return;
|
||||||
|
|
||||||
// Memory viewer
|
// Memory viewer
|
||||||
idm::make<memory_viewer_handle>(this, pc, make_check_cpu(cpu));
|
idm::make<memory_viewer_handle>(this, pc, make_check_cpu(cpu));
|
||||||
return;
|
return;
|
||||||
|
@ -182,6 +182,10 @@ void debugger_list::keyPressEvent(QKeyEvent* event)
|
|||||||
case Qt::Key_Down: scroll(-1); return;
|
case Qt::Key_Down: scroll(-1); return;
|
||||||
case Qt::Key_I:
|
case Qt::Key_I:
|
||||||
{
|
{
|
||||||
|
if (event->isAutoRepeat())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (m_cpu && m_cpu->id_type() == 0x55)
|
if (m_cpu && m_cpu->id_type() == 0x55)
|
||||||
{
|
{
|
||||||
create_rsx_command_detail(m_pc, currentRow());
|
create_rsx_command_detail(m_pc, currentRow());
|
||||||
|
@ -149,6 +149,12 @@ void gs_frame::showEvent(QShowEvent *event)
|
|||||||
|
|
||||||
void gs_frame::keyPressEvent(QKeyEvent *keyEvent)
|
void gs_frame::keyPressEvent(QKeyEvent *keyEvent)
|
||||||
{
|
{
|
||||||
|
if (keyEvent->isAutoRepeat())
|
||||||
|
{
|
||||||
|
keyEvent->ignore();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// NOTE: needs to be updated with keyboard_pad_handler::processKeyEvent
|
// NOTE: needs to be updated with keyboard_pad_handler::processKeyEvent
|
||||||
|
|
||||||
switch (keyEvent->key())
|
switch (keyEvent->key())
|
||||||
|
@ -2654,6 +2654,11 @@ void main_window::CreateFirmwareCache()
|
|||||||
|
|
||||||
void main_window::keyPressEvent(QKeyEvent *keyEvent)
|
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))
|
if (((keyEvent->modifiers() & Qt::AltModifier) && keyEvent->key() == Qt::Key_Return) || (isFullScreen() && keyEvent->key() == Qt::Key_Escape))
|
||||||
{
|
{
|
||||||
ui->toolbar_fullscreen->trigger();
|
ui->toolbar_fullscreen->trigger();
|
||||||
|
@ -725,6 +725,11 @@ void pad_settings_dialog::keyPressEvent(QKeyEvent *keyEvent)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (keyEvent->isAutoRepeat())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (m_button_id <= button_ids::id_pad_begin || m_button_id >= button_ids::id_pad_end)
|
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<int>(m_handler->m_type), m_button_id);
|
cfg_log.error("Pad Settings: Handler Type: %d, Unknown button ID: %d", static_cast<int>(m_handler->m_type), m_button_id);
|
||||||
|
@ -274,7 +274,7 @@ void rsx_debugger::closeEvent(QCloseEvent* event)
|
|||||||
|
|
||||||
void rsx_debugger::keyPressEvent(QKeyEvent* event)
|
void rsx_debugger::keyPressEvent(QKeyEvent* event)
|
||||||
{
|
{
|
||||||
if (isActiveWindow())
|
if (isActiveWindow() && !event->isAutoRepeat())
|
||||||
{
|
{
|
||||||
switch (event->key())
|
switch (event->key())
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user