Bug 467302 - "Force virtual keyboard to be visible" function that bypasses input event filtering
Summary: "Force virtual keyboard to be visible" function that bypasses input event fil...
Status: ASSIGNED
Alias: None
Product: kwin
Classification: Plasma
Component: virtual-keyboard (show other bugs)
Version: 5.27.2
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks: 466948 467209
  Show dependency treegraph
 
Reported: 2023-03-13 20:59 UTC by Nate Graham
Modified: 2024-01-26 09:57 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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