Fix keyboard layout order

i8 changed/i8/anaconda-33.16.9.4-1.el8.inferit.4
Arkady L. Shane 11 months ago
parent 7679bd3e28
commit 88e71afeeb
Signed by: tigro
GPG Key ID: 1EC08A25C9DB2503

@ -0,0 +1,44 @@
From d6795301a2adecb99e94e0d5a91dbe5404b370f5 Mon Sep 17 00:00:00 2001
From: Anton Volkov <AV.Volkov@softline.com>
Date: Thu, 8 Feb 2024 20:59:29 +0300
Subject: [PATCH] Backport bugfixes for keyboard layout:
https://bugzilla.redhat.com/show_bug.cgi?id=1039185
https://bugzilla.redhat.com/show_bug.cgi?id=1912609
---
pyanaconda/keyboard.py | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/keyboard.py b/pyanaconda/keyboard.py
index 2c3226c..3ab47bc 100644
--- a/pyanaconda/keyboard.py
+++ b/pyanaconda/keyboard.py
@@ -171,8 +171,10 @@ def set_x_keyboard_defaults(localization_proxy, xkl_wrapper):
# store it normalized
new_layouts = [normalize_layout_variant(layouts[0])]
if not langtable.supports_ascii(layouts[0]):
- # does not support typing ASCII chars, append the default layout
- new_layouts.append(DEFAULT_KEYBOARD)
+ # The default keymap setting should have "us" before the native layout
+ # which does not support ascii,
+ # refer: https://bugzilla.redhat.com/show_bug.cgi?id=1039185
+ new_layouts.insert(0, DEFAULT_KEYBOARD)
else:
log.error("Failed to get layout for chosen locale '%s'", locale)
new_layouts = [DEFAULT_KEYBOARD]
@@ -181,6 +183,12 @@ def set_x_keyboard_defaults(localization_proxy, xkl_wrapper):
if conf.system.can_configure_keyboard:
xkl_wrapper.replace_layouts(new_layouts)
+ # the console layout configured should be "native" by default,
+ # setting that explicitly for non-ascii layouts where we prepend "us"
+ # refer: https://bugzilla.redhat.com/show_bug.cgi?id=1912609
+ if len(new_layouts) >= 2 and not langtable.supports_ascii(new_layouts[1]):
+ localization_proxy.SetVirtualConsoleKeymap(new_layouts[1])
+
if len(new_layouts) >= 2 and not localization_proxy.LayoutSwitchOptions:
# initialize layout switching if needed
localization_proxy.SetLayoutSwitchOptions(["grp:alt_shift_toggle"])
--
2.39.3

@ -1,7 +1,7 @@
Summary: Graphical system installer Summary: Graphical system installer
Name: anaconda Name: anaconda
Version: 33.16.9.4 Version: 33.16.9.4
Release: 1%{?dist}.inferit.3 Release: 1%{?dist}.inferit.4
License: GPLv2+ and MIT License: GPLv2+ and MIT
URL: http://fedoraproject.org/wiki/Anaconda URL: http://fedoraproject.org/wiki/Anaconda
@ -22,6 +22,7 @@ Patch8: 0008-Set-Russian-as-default-language-for-new-regions.patch
Patch9: 0009-MSVSphere-Adaptation-Patch.patch Patch9: 0009-MSVSphere-Adaptation-Patch.patch
Patch10: 0010-Fix-smt-url.patch Patch10: 0010-Fix-smt-url.patch
Patch11: 0011-Enable-administrator-by-default.patch Patch11: 0011-Enable-administrator-by-default.patch
Patch12: 0012-Backport-bugfixes-for-keyboard-layout.patch
# Versions of required components (done so we make sure the buildrequires # Versions of required components (done so we make sure the buildrequires
# match the requires versions of things). # match the requires versions of things).
@ -383,6 +384,9 @@ desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{buildroot}%{_d
%{_prefix}/libexec/anaconda/dd_* %{_prefix}/libexec/anaconda/dd_*
%changelog %changelog
* Tue Feb 13 2024 Arkady L. Shane <tigro@msvsphere-os.ru> - 33.16.9.4-1.inferit.4
- Fix keyboard layout order
* Tue Jan 23 2024 Arkady L. Shane <tigro@msvsphere-os.ru> - 33.16.9.4-1.inferit.3 * Tue Jan 23 2024 Arkady L. Shane <tigro@msvsphere-os.ru> - 33.16.9.4-1.inferit.3
- Fix typo - Fix typo

Loading…
Cancel
Save