Bug 501649 - Enter key does not work on the User Switcher widget
Summary: Enter key does not work on the User Switcher widget
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: User Switcher widget (show other bugs)
Version: master
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Blazer Silving
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-17 15:55 UTC by krblanc
Modified: 2025-03-19 16:56 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.3.4
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description krblanc 2025-03-17 15:55:53 UTC
SUMMARY
If I try to use the widget with the keyboard, navigating with arrow keys, tab or dismissing the widget with esc works, but using enter to select does not work.

STEPS TO REPRODUCE
1.  Add User Switcher Widget to Desktop.
2. Engage widget either via shortcut or by clicking on it with mouse.
3. Select option with arrow keys.
4. Try to choose option with Enter.

OBSERVED RESULT

 Nothing will happen. 

EXPECTED RESULT

Enter will behave as if option was clicked by mouse. E.g. I want to quicly change users by pressing shortcut, navigating with arrows and pressing enter to the selected user, to switch to that user. Since Enter does not work, it is impossible to switch user via keyboard using the Widget (or any other way as far as I am aware, switching users is not an option in shortcuts in settings).

SOFTWARE/OS VERSIONS

OS: Fedora Linux 41 (KDE Plasma)
Linux version: 6.13.6
KDE Plasma Version: 6.3.3 
KDE Frameworks Version: 6.12.0
Qt Version: 6.8.2
Comment 1 Blazer Silving 2025-03-17 16:50:36 UTC
Hello, I can confirm this.

As it were, Space bar does work to switch accounts. I'm thinking there may be a missing mapping for Enter/Return key in the widget's code adjacent to the other key mappings. 

I'll take a look at this very soon, thanks for reporting!
Comment 2 Bug Janitor Service 2025-03-19 11:57:48 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kdeplasma-addons/-/merge_requests/702
Comment 3 Nate Graham 2025-03-19 14:24:38 UTC
Git commit aa86e29398d1b62935d923e35a0e532bbba24da6 by Nate Graham, on behalf of Marco Martin.
Committed on 19/03/2025 at 14:24.
Pushed by ngraham into branch 'master'.

applets/userSwitcher: Fix keyboard navigation

Give focus the first time the applet is opened
and accept enter key to activate items
FIXED-IN: 6.3.4

M  +5    -0    applets/userswitcher/package/contents/ui/ListDelegate.qml
M  +9    -2    applets/userswitcher/package/contents/ui/main.qml

https://invent.kde.org/plasma/kdeplasma-addons/-/commit/aa86e29398d1b62935d923e35a0e532bbba24da6
Comment 4 Nate Graham 2025-03-19 15:04:04 UTC
Git commit 5aa760fac5bc8767b3af5d99525890283d129b5c by Nate Graham.
Committed on 19/03/2025 at 14:25.
Pushed by ngraham into branch 'Plasma/6.3'.

applets/userSwitcher: Fix keyboard navigation

Give focus the first time the applet is opened
and accept enter key to activate items
FIXED-IN: 6.3.4


(cherry picked from commit aa86e29398d1b62935d923e35a0e532bbba24da6)

691edeac applets/userSwitcher: Fix keyboard navigation

Co-authored-by: Marco Martin <notmart@gmail.com>

M  +5    -0    applets/userswitcher/package/contents/ui/ListDelegate.qml
M  +9    -2    applets/userswitcher/package/contents/ui/main.qml

https://invent.kde.org/plasma/kdeplasma-addons/-/commit/5aa760fac5bc8767b3af5d99525890283d129b5c
Comment 5 Blazer Silving 2025-03-19 16:56:26 UTC
Confirmed this works on my end :) 

Thanks!