Permalink
Browse files

libtorc-baseui: Tweak custom keypress handling

  • Loading branch information...
1 parent 83692dc commit fe9703de58529fd895f66bd6e38d821e6cebe923 @mark-kendall mark-kendall committed Sep 9, 2012
Showing with 4 additions and 2 deletions.
  1. +2 −1 libs/libtorc-baseui/opengl/uiopenglwindow.cpp
  2. +2 −1 libs/libtorc-baseui/uiactions.cpp
View
3 libs/libtorc-baseui/opengl/uiopenglwindow.cpp
@@ -270,9 +270,10 @@ void UIOpenGLWindow::customEvent(QEvent *Event)
close();
break;
case Torc::KeyPress:
+ case Torc::KeyRelease:
{
QKeyEvent *keyevent = new QKeyEvent(
- QEvent::KeyPress,
+ event == Torc::KeyPress ? QEvent::KeyPress : QEvent::KeyRelease,
torcevent->Data().value("key").toInt(),
TORC_KEYEVENT_MODIFIERS,
torcevent->Data().value("source").toString());
View
3 libs/libtorc-baseui/uiactions.cpp
@@ -74,7 +74,8 @@ int UIActions::GetActionFromKey(QEvent *Event)
// pressed and released
if (key == Qt::Key_Return ||
- key == Qt::Key_Enter)
+ key == Qt::Key_Enter ||
+ key == Qt::Key_Select)
{
LOG(VB_GENERAL, LOG_DEBUG, QString("KeyPress/Release %1").arg(key, 0, 16));
return keyevent->type() == QEvent::KeyPress ? Torc::Pushed : Torc::Released;

0 comments on commit fe9703d

Please sign in to comment.