wasm: move CTRL <-> META comment into right place

Change-Id: I9f95542fd6a0326985744503a71e36448961d6fc
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: David Skoland <david.skoland@qt.io>
bb10
Morten Sørvig 2022-04-12 12:44:34 +02:00
parent e3b3c77d0e
commit 8e15aeee76
2 changed files with 3 additions and 2 deletions

View File

@ -37,8 +37,6 @@ QWasmCompositedWindow::QWasmCompositedWindow()
{
}
// macOS CTRL <-> META switching. We most likely want to enable
// the existing switching code in QtGui, but for now do it here.
bool g_scrollingInvertedFromDevice = false;
static void mouseWheelEvent(emscripten::val event)

View File

@ -162,6 +162,9 @@ QWasmEventTranslator::~QWasmEventTranslator()
template <typename Event>
QFlags<Qt::KeyboardModifier> QWasmEventTranslator::translatKeyModifier(const Event *event)
{
// macOS CTRL <-> META switching. We most likely want to enable
// the existing switching code in QtGui, but for now do it here.
QFlags<Qt::KeyboardModifier> keyModifier = Qt::NoModifier;
if (event->shiftKey)
keyModifier |= Qt::ShiftModifier;