diff --git a/OSBindings/Qt/mainwindow.cpp b/OSBindings/Qt/mainwindow.cpp index f4bf5eeb8..1bb23dffd 100644 --- a/OSBindings/Qt/mainwindow.cpp +++ b/OSBindings/Qt/mainwindow.cpp @@ -715,6 +715,8 @@ void MainWindow::setUIPhase(UIPhase phase) { // widgets aren't still selectable after a machine starts. if(phase != UIPhase::SelectingMachine) { ui->openGLWidget->setFocus(); + } else { + ui->startMachineButton->setDefault(true); } // Indicate whether to catch mouse input. diff --git a/OSBindings/Qt/scantargetwidget.cpp b/OSBindings/Qt/scantargetwidget.cpp index 00f11e492..99072b486 100644 --- a/OSBindings/Qt/scantargetwidget.cpp +++ b/OSBindings/Qt/scantargetwidget.cpp @@ -143,13 +143,20 @@ void ScanTargetWidget::setMouseDelegate(MouseDelegate *delegate) { } void ScanTargetWidget::keyPressEvent(QKeyEvent *event) { + // Use CTRL+Escape to end mouse captured mode, if currently captured; otherwise ignore the event. + // Empirical note: control actually appears to mean command on the Mac. I have no idea what the + // Mac's command key would actually be as a modifier. Fingers crossed control means control + // elsewhere (?). if(mouseIsCaptured && event->key() == Qt::Key_Escape && event->modifiers()&Qt::ControlModifier) { releaseMouse(); QCursor cursor; cursor.setShape(Qt::ArrowCursor); setCursor(cursor); + return; } + + event->ignore(); } void ScanTargetWidget::releaseMouse() {