Re: Developing onscreen keyboards under Wayland for KDE Plasma

Justin Zobel <[email protected]>
Newsgroups gmane.comp.kde.devel.general
Message-ID <[email protected]>
On 3/12/25 10:25, John Ramsden wrote:
> Beyond terminal emulators, my concern - I do not know if this is 
> founded - is there will be some situations where I cannot input what I 
> need. Does the application not need to be wayland aware?
>
> --
>   John Ramsden
>
> On Mon, Dec 1, 2025, at 3:50 PM, Justin Zobel wrote:
>> On 2 December 2025 9:48:39 am ACDT, John Ramsden 
>> <[email protected]> wrote:
>>
>>     Hi,
>>     I require an on-screen keyboard with full functionality similar
>>     to what is provided by onboard. Unfortunately these types of
>>     on-screen keyboards are not found on Wayland, and plasma will be
>>     dropping X11 support in 6.8. I understand there is work being
>>     done to provide a virtual keyboard
>>     (https://invent.kde.org/plasma/plasma-keyboard) for Wayland.
>>     Unfortunately for my use case I need something that works not
>>     only in text fields but globally, similar to the functionality
>>     you would get from a hardware keyboard. I need to be able to
>>     issue inputs into terminals, along with modifier keys etc. As far
>>     as I can tell (and please correct me if I'm wrong) but this is
>>     not the intention of the virtual keyboards that are being
>>     provided by plasma for Wayland.
>>     The integrations to provide virtual keyboards appear to be using
>>     input-method-v1, which allows you to target text inputs. What I'm
>>     looking for is something that is globally available and allows me
>>     to interact with my computer as if I'm using a hardware keyboard.
>>     I want to be able to issue inputs without restrictions (for
>>     example trigger global shortcuts) as if I'm a regular keyboard user.
>>     I've been looking into some options for doing what I am looking
>>     to do, and I was seeking some input from plasma developers to
>>     make sure what I'm attempting to do is actually going down the
>>     supported route. I don't want to build something that is actively
>>     considered misuse of wayland, or is looked at as a security concern.
>>     I see a few options:
>>     * Pretend to be a hardware keyboard via an emulated device such
>>     as using uinput - is this looked down upon since it essentially
>>     goes around Wayland? Would plasma considered blocking something
>>     like emulated devices in the future?
>>     * Ideally use something like zwp_virtual_keyboard_v1 but this
>>     does not seem to be supported by plasma. Is there any intention
>>     to support something like this in the future?
>>     * Use XDG RemoteDesktop Portal - would this be seen as misuse of
>>     the API?
>>     Ultimately my use case is I want a keyboard that sits on my
>>     desktop and allows me to input anything a regular hardware
>>     keyboard would be able to input.
>>
>>
>> Plasma Virtual Keyboard allows input into terminal emulators like 
>> Konsole. Modifier keys I'm not sure on as I'm not at my PC but it is 
>> something that Qmlkonsole supports so it should in theory be possible 
>> to add this to PVK.
>
With all things considered, your best option to find out if it will work 
for you, is to try it.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.