Bug 467302

Summary: "Force virtual keyboard to be visible" function that bypasses input event filtering
Product: [Plasma] kwin Reporter: Nate Graham <nate>
Component: virtual-keyboardAssignee: KWin default assignee <kwin-bugs-null>
Status: ASSIGNED ---    
Severity: wishlist CC: aleixpol, kde, m1vri31c, putr4.s
Priority: NOR    
Version: 5.27.2   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Bug Depends on:    
Bug Blocks: 466948, 467209    

Description Nate Graham 2023-03-13 20:59:32 UTC
Right now when KWin receives the signal to show the virtual keyboard, it ignores the request if the input event associated with it wasn't a touch event. This is done to prevent the virtual keyboard from appearing constantly in response to automatic or manually-driven focus events when using a keyboard or pointing device, which would drive people crazy.

But, it also prevents the virtual keyboard from being openable manually, as a deliberate user action. Why would the user want to do this? I can think of a variety of legitimate reasons:

1. Keys on the physical keyboard that are used to type the password have suddenly stopped working, and without a virtual keyboard the user is locked out of the system or actions that require authentication while they're waiting for a new keyboard or a technician to arrive.
2. Otherwise the "Show virtual keyboard" buttons on the lock and login screens do nothing when clicked using a pointing device and feel broken.
3. Not all apps properly support automatically showing the virtual keyboard when their input fields are tapped with a touchscreen.Ideally these apps should be fixed, but the world isn't perfect and users will need a manual workaround to avoid losing productivity when using such apps before their developer has fixed the issue (if this even ever happens).
4. User preference; some people find it annoying when the keyboard appears automatically and prefer to show and hide it manually.

Accordingly, it would be nice if we could ask KWin to open the virtual keyboard no matter what, in support of requests such as Bug 466948 and Bug 467209.
Comment 1 Nate Graham 2023-03-27 20:22:53 UTC
So we have "KWinVirtualKeyboard.forceActivate()" which we use in the input method control widget, but it still doesn't bypass event filtering like its name suggests. Perhaps it should, so that we can finally fix Bug 467209 and Bug 466948.
Comment 2 Bug Janitor Service 2023-03-28 13:55:31 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/3895
Comment 3 Nate Graham 2024-06-11 14:05:48 UTC
*** Bug 488346 has been marked as a duplicate of this bug. ***