mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-25 20:22:30 +01: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)
|
||||
{
|
||||
if (event->isAutoRepeat())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (event->key() == Qt::Key_Delete)
|
||||
{
|
||||
OnRemove();
|
||||
|
@ -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<spu_thread*>(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<memory_viewer_handle>(this, pc, make_check_cpu(cpu));
|
||||
return;
|
||||
|
@ -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());
|
||||
|
@ -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())
|
||||
|
@ -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();
|
||||
|
@ -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<int>(m_handler->m_type), m_button_id);
|
||||
|
@ -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())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user