Changing behaviour of lockscreen on kde plasma

I have been very irritated from some time with how kde’s lockscreen handles keyboard input in password field. Currently the behaviour is as follows:

  1. When monitor is off, first keystroke switches on the monitor, subsequent strokes are then input in password field

  2. With monitor on and lockscreen not displaying password field (only showing clock and some music notifications), even the first keystroke gets input into password field.

In SDDM, one can directly start typing irrespective of the monitor being on or off.

In windows, unless the password field is visible, first keystroke always makes the password field visible.

I personally prefer SDDM’s approach (which was also kde’s lockscreen behaviour some time back at least on arch) where one can just start typing irrespective of anything.

So is there a way to get this behaviour back in lockscreen on kde? Currently its just inconsistent and hampering my muscle memory

SDDM and Lock Screen are two separate things, and they have different qml file locations and code.
On my end when i type the password, even if the screen is off and lock screen only shows the clock (that you can hide from System Settings > Workspace Behavior > Screen locking > Appearance Configure and disable it) …

image

… it will actually type the password and i can simply hit Enter right after that, to log in.

If you want to have always the password field visible, just edit the file
/usr/share/plasma/look-and-feel/org.kde.breeze.desktop/contents/lockscreen/MainBlock.qml

on line 20, change the

property bool lockScreenUiVisible: false

to be

property bool lockScreenUiVisible: true

and then edit the file /usr/share/plasma/look-and-feel/org.kde.breeze.desktop/contents/lockscreen/LockScreenUi.qml

on line 80 change the

property bool uiVisible: false

to be

property bool uiVisible: true

then on /usr/share/plasma/look-and-feel/org.kde.breeze.desktop/contents/lockscreen/LockScreen.qml
line 15, from

property bool viewVisible: false

to

property bool viewVisible: true

If i’m not mistaken there are discussions in KDE Plasma VDG team to make new SDDM and Lock screens, that are more consistent. Not sure tho on who will do it and when this will happen.

1 Like

Okay, I made the changes. After making them, the password input box never disappears. However, when monitor switches off, first keystroke still goes to switch on the monitor instead of text field. I should add that manually switching off monitor does not interfere with lockscreen, only when it switches off by itself