From 7b625ab83bdbf84d1b30b6ec3a7dadec21a5464b Mon Sep 17 00:00:00 2001 From: ksuprynowicz Date: Sun, 23 Jun 2024 23:18:47 +0200 Subject: [PATCH] Allow events from VR keyboard to overlay UI --- interface/src/ui/Keyboard.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/src/ui/Keyboard.cpp b/interface/src/ui/Keyboard.cpp index d8038e8727..eba1bcec3f 100644 --- a/interface/src/ui/Keyboard.cpp +++ b/interface/src/ui/Keyboard.cpp @@ -585,8 +585,8 @@ void Keyboard::handleTriggerBegin(const QUuid& id, const PointerEvent& event) { QKeyEvent* pressEvent = new QKeyEvent(QEvent::KeyPress, scanCode, Qt::NoModifier, keyString); QKeyEvent* releaseEvent = new QKeyEvent(QEvent::KeyRelease, scanCode, Qt::NoModifier, keyString); - QCoreApplication::postEvent(QCoreApplication::instance(), pressEvent); - QCoreApplication::postEvent(QCoreApplication::instance(), releaseEvent); + QCoreApplication::postEvent(qApp->getPrimaryWidget(), pressEvent); + QCoreApplication::postEvent(qApp->getPrimaryWidget(), releaseEvent); if (!getPreferMalletsOverLasers()) { key.startTimer(KEY_PRESS_TIMEOUT_MS);