Show message on LockScreen if SlowKeys are enabled

If a user has enbled the SlowKeys filter in Accessibility settings, show
this in the lock screen. This is similar to CapsLock being enabled, as
it might be very confusing for a user that forgot about SlowKeys.

Depends On: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/6626

I've decided **not** to include the feedback from [https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/3660](https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/3660) . I could not continue that MR as I failed to push to that branch again (I'm new to git, it's most likely something I've done wrong in my setup, sorry!)

Reason for not including the feedback: 
There's currently three potential messages that could be shown: CapsLock Enabled, SlowKeys Enabled, and "root notification" (which I'm not quite sure what they are). Having something along the line of "CapsLock and SlowKeys are enabled" as suggested would potentially become quite complicated, if we also show more message, e.g. "Bounce Keys Enabled". This would lead to quite some possible combinations, blowing up the code and having multiple strings to translate.

I'm open to boldening parts of the string (e.g. **CapsLock** or **SlowKeys** etc.), though the root.notifications are probably not bold ?

| After | Before |
| ------ | ------ |
| ![Screenshot_20260520_092019](/uploads/1ff9287a557fa310c4f92d1946e2fa2d/Screenshot_20260520_092019.png){width=375 height=600}       | ![Screenshot_20260520_091851](/uploads/fb2329aafe52737368b63d87e505878d/Screenshot_20260520_091851.png){width=375 height=600}       |


@teams/vdg
@teams/usability
This commit is contained in:
Martin Riethmayer 2026-05-28 15:59:14 +02:00 committed by Nate Graham
parent 872c9990a9
commit 4ab5ef6bfb

View file

@ -11,6 +11,7 @@ import QtQuick.Layouts
import Qt5Compat.GraphicalEffects
import org.kde.plasma.components as PlasmaComponents3
import org.kde.plasma.private.accessibility
import org.kde.plasma.workspace.components as PW
import org.kde.plasma.private.keyboardindicator as KeyboardIndicator
import org.kde.kirigami as Kirigami
@ -90,6 +91,10 @@ Item {
id: sessionManagement
}
AccessibilityStatus {
id: accessibilityStatus
}
KeyboardIndicator.KeyState {
id: capsLockState
key: Qt.Key_CapsLock
@ -288,6 +293,9 @@ Item {
if (capsLockState.locked) {
parts.push(i18ndc("plasma_shell_org.kde.plasma.desktop", "@info:status", "Caps Lock is on"));
}
if (accessibilityStatus.slowKeysEnabled) {
parts.push(i18ndc("plasma_shell_org.kde.plasma.desktop", "@info:status", "Slow Keys are enabled"));
}
if (root.notification) {
parts.push(root.notification);
}