summaryrefslogtreecommitdiff
path: root/raveos-calamares-module/welcome/RaveWelcomeViewStep.cpp
diff options
context:
space:
mode:
authorNippy <nippy@Nippy-Mac-mini.local>2026-09-17 15:49:50 +0200
committerNippy <nippy@Nippy-Mac-mini.local>2026-09-17 15:49:50 +0200
commitf676fc2bad71c23605c846027a6d3691508075fd (patch)
tree0a2c875c1587672ec4f87c5d3c47e36c55112eeb /raveos-calamares-module/welcome/RaveWelcomeViewStep.cpp
parent6903c5a6ebb0b6a8536d5565f01a900051d1071b (diff)
downloadRaveOS-PKGBUILD-f676fc2bad71c23605c846027a6d3691508075fd.tar.gz
RaveOS-PKGBUILD-f676fc2bad71c23605c846027a6d3691508075fd.zip
wifi fix
Diffstat (limited to 'raveos-calamares-module/welcome/RaveWelcomeViewStep.cpp')
-rw-r--r--raveos-calamares-module/welcome/RaveWelcomeViewStep.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/raveos-calamares-module/welcome/RaveWelcomeViewStep.cpp b/raveos-calamares-module/welcome/RaveWelcomeViewStep.cpp
index 6c4e4a3..b2108c6 100644
--- a/raveos-calamares-module/welcome/RaveWelcomeViewStep.cpp
+++ b/raveos-calamares-module/welcome/RaveWelcomeViewStep.cpp
@@ -6,6 +6,7 @@
#include <QLabel>
#include <QLocale>
#include <QPainter>
+#include <QProcess>
#include <QPixmap>
#include <QResizeEvent>
#include <QVBoxLayout>
@@ -103,6 +104,10 @@ void RaveWelcomeViewStep::buildWidget()
m_langCombo->setCurrentIndex(m_currentLocaleIndex);
+ // Make the live keyboard layout match the initial language right away,
+ // so the WiFi password input is not stuck on the boot default (US).
+ applyLiveKeyboardLayout(m_localeIds.value(m_currentLocaleIndex));
+
connect(m_langCombo, QOverload<int>::of(&QComboBox::activated),
this, &RaveWelcomeViewStep::onLanguageChanged);
@@ -168,6 +173,10 @@ void RaveWelcomeViewStep::onLanguageChanged(int index)
gs->insert("locale", lang);
}
}
+
+ // Apply the matching live keyboard layout immediately, so the WiFi
+ // password input follows the selected language (before the keyboard page).
+ applyLiveKeyboardLayout(localeId);
}
QString RaveWelcomeViewStep::brandingTranslationsPrefix() const
@@ -177,6 +186,29 @@ QString RaveWelcomeViewStep::brandingTranslationsPrefix() const
return QString();
}
+void RaveWelcomeViewStep::applyLiveKeyboardLayout(const QString& localeId)
+{
+ QString layout = QStringLiteral("us");
+ if (localeId.startsWith(QLatin1String("hu")))
+ {
+ layout = QStringLiteral("hu");
+ }
+ else if (localeId.startsWith(QLatin1String("de")))
+ {
+ layout = QStringLiteral("de");
+ }
+ else if (localeId == QLatin1String("en_GB"))
+ {
+ layout = QStringLiteral("gb");
+ }
+
+ // Best effort: apply the layout to the running X11 session so the WiFi
+ // password input matches the selected language immediately. A missing
+ // setxkbmap or non-X11 session must not break the installer.
+ const QStringList args { QStringLiteral("-layout"), layout };
+ QProcess::startDetached(QStringLiteral("setxkbmap"), args);
+}
+
bool RaveWelcomeViewStep::isNextEnabled() const { return true; }
bool RaveWelcomeViewStep::isBackEnabled() const { return false; }
bool RaveWelcomeViewStep::isAtBeginning() const { return true; }