Add up and down direction to the key detection

This commit is contained in:
2015-09-24 21:36:03 +01:00
parent 40b19ec6d9
commit e81d2d2f38
2 changed files with 9 additions and 1 deletions
+7 -1
View File
@@ -203,7 +203,7 @@ VideoSubWindow::~VideoSubWindow()
Void VideoSubWindow::keyPressEvent( QKeyEvent* event )
{
if( checkCategory( MODULE_SUBWINDOW ) && m_pcCurrentDisplayModule )
if( m_pcCurrentDisplayModule )
{
if( m_pcCurrentDisplayModule->getModuleRequirements() & MODULE_USES_KEYS )
{
@@ -216,6 +216,12 @@ Void VideoSubWindow::keyPressEvent( QKeyEvent* event )
case Qt::Key_D:
bRet = m_pcCurrentDisplayModule->getModule()->keyPressed( MODULE_KEY_RIGHT );
break;
case Qt::Key_W:
bRet = m_pcCurrentDisplayModule->getModule()->keyPressed( MODULE_KEY_UP );
break;
case Qt::Key_S:
bRet = m_pcCurrentDisplayModule->getModule()->keyPressed( MODULE_KEY_DOWN );
break;
}
if( bRet )
{