Bug 506422

Summary: layout filter unreliable
Product: [Applications] systemsettings Reporter: michiel.scheffer <michiel.scheffer>
Component: kcm_keyboardAssignee: Plasma Bugs List <plasma-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: butirsky, duha.bugs, grahamperrin, kde, kdedev, natalie_clarius, nate, sitter
Priority: NOR Keywords: regression, usability
Version First Reported In: 6.4.1   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description michiel.scheffer@gmail.com 2025-07-01 07:33:59 UTC
SUMMARY

          systemsettings >> keyboard >> keyboard >> layouts. (kcm_keyboard)

The auto filter algorithm for finding (while typing) certain keyboard layouts filters results erroneously, while when manually scrolling through all options, and thus bypassing the auto filter, it works fine.
In my case I was looking for: "English (US)" --- "English (US, intl., with dead keys)"

STEPS TO REPRODUCE

1.  Select a (the) Generic 105 - Key PC model (or any other)
2.  Enable  'layouts'. Choose 'Add' 
3. Start typing in the new pop-up search widget

OBSERVED RESULT / EXPECTED RESULT

I tried various combinations, such as : 'en', 'us', 'int', 'dead', 'dutch', etctetc, yet "English (US, intl., with dead keys)" could not be found. On dozens of earlier occasions, this never proved to be an issue.

I went through extensive locale - debugging / reconfiguration to see if that would help. Which it didn't.
Then after quite a while, when I stumbled upon my preciously sought after layout after all, albeit ONLY when thumbing/scrolling through the list.

TL;DR: any typed combo like: 'en', 'us', 'int', 'dead', 'dutch', etctetc, actually filters out the layout in question.
When you manually scroll (left column) to where (English (US)) it is supposed to be (right column) and indeed select (English (US)) (left column), it is there.. but as soon as you start typing in the search bar, it is gone.

Also tested with a new, clean user (empty homedir), same result.


SOFTWARE/OS VERSIONS

OS: Arch Linux x86_64
Qt Version: 6.9.1
Kernel: 6.15.3-zen1-1.1-zen
KDE Frameworks Version: 6.15.0
Packages: 1369 (pacman)
Shell: bash 5.2.37
Resolution: 1920x1080
DE: Plasma 6.4.1
WM: KWin Graphics Platform: X11
Theme: Adwaita-dark [GTK2/3]
Icons: BeautyLine [GTK2/3]
Terminal: yakuake
Terminal Font: FiraCodeNF 11
CPU: 12th Gen Intel i7-12700H (20) @ 4.600GHz
GPU: NVIDIA GeForce RTX 3070 Mobile / Max-Q
GPU: Intel Alder Lake-P GT2 [Iris Xe Graphics]
Memory: 4410MiB / 15603MiB

ADDITIONAL INFORMATION

	# cat /etc/locale.conf

LANG=en_GB.UTF-8
LANGUAGE=en_GB:en_US:en
LC_COLLATE=nl_NL.UTF-8
LC_CTYPE=nl_NL.UTF-8
LC_MEASUREMENT=nl_NL.UTF-8
LC_MESSAGES=en_GB.UTF-8
LC_MONETARY=nl_NL.UTF-8
LC_NUMERIC=nl_NL.UTF-8
LC_PAPER=nl_NL.UTF-8
LC_TIME=nl_NL.UTF-8


	# locale-gen
	# localectl set-keymap us
	# localectl set-x11-keymap us us us-intl
	$ rm -f $XDG_CONFIG_HOME/plasma-localerc
	

	$ for i in {kde,plasma}; do pacman -Qqen | grep $i; done
	
kde-cli-tools					plasma-desktop
kde-gtk-config 				kdeconnect
kdecoration 					kdenlive
kdeplasma-addons 			polkit-kde-agent
xdg-desktop-portal-kde		kdeplasma-addons
libplasma 					plasma-activities
plasma-activities-stats 		plasma-browser-integration
plasma-disks 				plasma-firewall
plasma-integration 			plasma-nm
plasma-pa 					plasma-sdk
plasma-thunderbolt 			plasma-vault
plasma-wayland-protocols 	plasma-welcome
plasma-workspace 			plasma-workspace-wallpapers
plasma-x11-session 			plasma5support
plasma-systemmonitor
Comment 1 Harald Sitter 2025-07-01 10:26:20 UTC
The way the current module deals with filtering is super messy. It basically disqualifies all layouts that are a variant (such as the dead keys layouts). Unfortunately fixing this is a bit non-trivial because there are also performance problems and relevance problems if this filter was not in place. e.g. searching for "english" would yield half the world's layouts because they have english variants.

Most relevant line in the current code https://invent.kde.org/plasma/plasma-desktop/-/blob/44c7251cd00a6f6ad955f8e60e5ae23c3afb7121/kcms/keyboard/ui/LayoutDialog.qml#L61

Also for future reference the LayoutSearchModel is essentially no-op from a filter perspective https://invent.kde.org/plasma/plasma-desktop/-/blob/master/kcms/keyboard/layoutsearchmodel.cpp#L59
Comment 2 uncognic 2025-10-12 21:47:53 UTC
*** Bug 510536 has been marked as a duplicate of this bug. ***
Comment 3 Graham Perrin 2025-10-13 00:29:03 UTC
Regression; not present in the following environment on Kubuntu 25.04: 

- KDE Plasma 6.3.4
- KDE Frameworks 6.12.0
- Qt 6.8.3

Also, for discoverability/search purposes: 

  add layout
  uk