Bug 474705 - Make it easier and safer to allow XWayland apps to snoop the F-keys
Summary: Make it easier and safer to allow XWayland apps to snoop the F-keys
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_kwinxwayland (show other bugs)
Version: 5.27.8
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Nate Graham
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-19 20:47 UTC by tesla
Modified: 2023-11-06 16:07 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tesla 2023-09-19 20:47:33 UTC
The default options for KDE's Legacy X11 App Support isn't great, for me at least. I use discord as my primary messaging client and have a keybind for push-to-talk which is F24. I do not want to use control, alt or shift since it is used in my games (primarily aoe2de with military movements, formations, etc). Holding these keys to use F24 doesn't help either, and allowing all of the keys to be capture defeats the purpose of using Wayland for system security. I would love to see a feature where the user can select a specific key (or more) that xwayland application can capture.  Have the user select function keys (in my case F24), a specific character or any option that they need xwayland applications to capture.

The transition to Wayland for Fedora users is near and I doubt discord is willing to put the effort to make the transition easily (especially since we still do not have support for native desktop screen sharing!), so please consider this suggestion.
Comment 1 David Edmundson 2023-09-19 21:12:30 UTC
I think there's another option that doesn't us making a complex UI which is both easier for us and better users. 

The ultimate goal of the meta+control+alt option is forwarding keys that satisfy both "stuff that is a sane global shortcut" and "stuff that won't be used in for typing sensitive contents".  F-keys and XF86BlahBlah keys fall into that group.
Comment 2 Nate Graham 2023-09-20 19:24:40 UTC
Agreed. We could include the F keys into the behavior controlled by option 2.
Comment 3 Bug Janitor Service 2023-09-20 20:12:55 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/4432
Comment 4 tesla 2023-09-20 22:02:19 UTC
(In reply to Nate Graham from comment #2)
> Agreed. We could include the F keys into the behavior controlled by option 2.

Hopefully this would include F keys 13-24, It would be better than nothing. Thank you guys for responding.
Comment 5 Nate Graham 2023-11-06 16:07:00 UTC
Git commit c5a3749a4023b30256f5e402bc67f8d5bc07a859 by Nate Graham.
Committed on 06/11/2023 at 16:19.
Pushed by ngraham into branch 'master'.

XWayland: allow snooping non-character keys with elevated snooping modes

These keys do not represent a security risk to allow apps to snoop since
they can't be used to type passwords etc.
FIXED-IN: 6.0

M  +2    -2    src/kcms/xwayland/ui/main.qml
M  +2    -2    src/options.h
M  +225  -4    src/xwayland/xwayland.cpp

https://invent.kde.org/plasma/kwin/-/commit/c5a3749a4023b30256f5e402bc67f8d5bc07a859