From 7c93aaf659aa2d0978baa745674fb2bc765922b8 Mon Sep 17 00:00:00 2001 From: kynoptic <50030280+kynoptic@users.noreply.github.com> Date: Wed, 3 Jun 2026 20:58:00 -0400 Subject: [PATCH] Force Tab focus to reach all controls on macOS macOS defaults keyboard navigation to text fields and lists only, so Tab (and the gamepad navigation that synthesizes it) can't move focus between controls on the settings page. Other platforms already default to this. --- app/main.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/main.cpp b/app/main.cpp index 1de4a258..b7d57853 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -753,6 +754,16 @@ int main(int argc, char *argv[]) QGuiApplication app(argc, argv); +#ifdef Q_OS_DARWIN + // macOS defaults "Keyboard navigation" to text fields and lists only, which + // prevents Tab (and the gamepad navigation that synthesizes it) from moving + // focus between non-text controls on the settings page. Force Tab to reach + // all controls so keyboard and gamepad UI navigation work without requiring + // the user to enable a system accessibility setting. Other platforms already + // default to this behavior. + app.styleHints()->setTabFocusBehavior(Qt::TabFocusAllControls); +#endif + #ifdef Q_OS_UNIX // Register signal handlers to arbitrate between SDL and Qt. // NB: This has to be done after the QGuiApplication is constructed to