mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-23 03:02:53 +01:00
Added ignoring of keyboard shortcuts to keyboard_pad_handler
This fixes an issue where pressing keyboard shortcuts will input them to the game.
This commit is contained in:
parent
be46c82aaa
commit
5326912bc0
@ -1,4 +1,4 @@
|
||||
#include "stdafx.h"
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "keyboard_pad_handler.h"
|
||||
|
||||
@ -60,9 +60,40 @@ void keyboard_pad_handler::keyPressEvent(QKeyEvent* event)
|
||||
event->ignore();
|
||||
return;
|
||||
}
|
||||
|
||||
Key(event->key(), 1);
|
||||
event->ignore();
|
||||
switch (event->key())
|
||||
{
|
||||
case Qt::Key_L:
|
||||
if (!(event->modifiers() == Qt::AltModifier)) { Key(event->key(), 1); }
|
||||
event->ignore();
|
||||
break;
|
||||
case Qt::Key_Return:
|
||||
if (!(event->modifiers() == Qt::AltModifier)) { Key(event->key(), 1); }
|
||||
break;
|
||||
event->ignore();
|
||||
case Qt::Key_Escape:
|
||||
event->ignore();
|
||||
break;
|
||||
case Qt::Key_P:
|
||||
if (!(event->modifiers() == Qt::ControlModifier)) { Key(event->key(), 1); }
|
||||
event->ignore();
|
||||
break;
|
||||
case Qt::Key_S:
|
||||
if (!(event->modifiers() == Qt::ControlModifier)) { Key(event->key(), 1); }
|
||||
event->ignore();
|
||||
break;
|
||||
case Qt::Key_R:
|
||||
if (!(event->modifiers() == Qt::ControlModifier)) { Key(event->key(), 1); }
|
||||
event->ignore();
|
||||
break;
|
||||
case Qt::Key_E:
|
||||
if (!(event->modifiers() == Qt::ControlModifier)) { Key(event->key(), 1); }
|
||||
event->ignore();
|
||||
break;
|
||||
default:
|
||||
Key(event->key(), 1);
|
||||
event->ignore();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void keyboard_pad_handler::keyReleaseEvent(QKeyEvent* event)
|
||||
|
Loading…
Reference in New Issue
Block a user