lightpreview: Add arrow-keys and pageUp/pageDown-keys for navigation.
This is useful for keyboards where WASD isn't practical, e.g., AZERTY-layout (France).
This commit is contained in:
parent
2210fd2701
commit
c62633f1a3
|
|
@ -1644,11 +1644,17 @@ void GLView::applyMouseMotion()
|
|||
static keys_t Qt_Key_To_keys_t(int key)
|
||||
{
|
||||
switch (key) {
|
||||
case Qt::Key_Up:
|
||||
case Qt::Key_W: return keys_t::up;
|
||||
case Qt::Key_Left:
|
||||
case Qt::Key_A: return keys_t::left;
|
||||
case Qt::Key_Down:
|
||||
case Qt::Key_S: return keys_t::down;
|
||||
case Qt::Key_Right:
|
||||
case Qt::Key_D: return keys_t::right;
|
||||
case Qt::Key_PageDown:
|
||||
case Qt::Key_Q: return keys_t::fly_down;
|
||||
case Qt::Key_PageUp:
|
||||
case Qt::Key_E: return keys_t::fly_up;
|
||||
}
|
||||
return keys_t::none;
|
||||
|
|
|
|||
Loading…
Reference in New Issue