diff --git a/OSBindings/Qt/mainwindow.cpp b/OSBindings/Qt/mainwindow.cpp index 04138e7fc..5e6b66410 100644 --- a/OSBindings/Qt/mainwindow.cpp +++ b/OSBindings/Qt/mainwindow.cpp @@ -1020,7 +1020,7 @@ bool MainWindow::processEvent(QKeyEvent *event) { const auto keyboardMachine = machine->keyboard_machine(); if(!keyboardMachine) return true; - auto keyboard = keyboardMachine->get_keyboard(); + auto &keyboard = keyboardMachine->get_keyboard(); keyboard.set_key_pressed(*key, event->text().size() ? event->text()[0].toLatin1() : '\0', isPressed); if(keyboard.is_exclusive() || keyboard.observed_keys().find(*key) != keyboard.observed_keys().end()) { return false;