From 5302d4dca63fdc457536a9de8755d7a438dd50a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Fri, 24 Jul 2026 19:07:55 +0200 Subject: [PATCH] [SETUP:REACTOS] Select a better default keyboard layout, depending on the selected language For example, when installing ReactOS in French, this selects the French keyboard layout as default, while keeping English installed but not activated. This is partly a "hack", and adapts the existing solution chosen in USETUP. A better fix will be done in the future. --- base/setup/reactos/reactos.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/base/setup/reactos/reactos.c b/base/setup/reactos/reactos.c index e3df176ac61..db9187c35e8 100644 --- a/base/setup/reactos/reactos.c +++ b/base/setup/reactos/reactos.c @@ -2920,7 +2920,10 @@ BOOL LoadSetupData( ListEntry = GetNextListEntry(ListEntry)) { PCWSTR pszLayoutId = ((PGENENTRY)GetListEntryData(ListEntry))->Id; - if (!_wcsicmp(pSetupData->DefaultKBLayout, pszLayoutId)) + // FIXME: Temporary "fix" to set the best keyboard entry depending on the + // selected language in unattended setup; see also usetup!SetupStartPage(). + if (( pSetupData->bUnattend && !_wcsicmp(pSetupData->DefaultLanguage, pszLayoutId)) || + (!pSetupData->bUnattend && !_wcsicmp(pSetupData->DefaultKBLayout, pszLayoutId))) { DPRINT("Found %S in LayoutList\n", pszLayoutId); SetCurrentListEntry(LayoutList, ListEntry);