Finally the Onboard on screen keyboard works on Wayland (bugs.launchpad.net)
from bjoern_tantau@swg-empire.de to linux@lemmy.ml on 19 Apr 2024 16:21
https://swg-empire.de/post/842090

This is too great not to share. Wayland devs hate this trick! I’ll copy what I did from the bug report.

As a workaround you can use github.com/Supreeeme/extest to make Onboard work. Compile it as a 64 bit library and launch onboard with

env LD_PRELOAD=/usr/lib64/libextest.so onboard

If you want to use it with KDE you can add

X-KDE-Wayland-VirtualKeyboard=true

to its desktop-file.

I used kwin rules to get rid of window decorations and have it always on top without stealing focus. If someone knows how to make all other windows smaller when it’s active that would be great.

Only problem remaining is that sometimes the keys get stuck on touch input. At least on my Steam Deck on OpenSUSE.

Edit: Just noticed that it doesn’t work on KDE’s lock screen. Hopefully I can find a workaround for that as well.

Edit 2: Was easier than I thought. Just select Maliit as a virtual keyboard and start Onboard manually. If you tap with your finger in a text field Maliit will come up. When you click in a text field Onboard will open. But Maliit also works on the lock screen.

#linux

threaded - newest

ricdeh@lemmy.world on 19 Apr 2024 18:44 next collapse

You got me excited there for a minute! Though I don’t really want workarounds (they are the only way and therefore a necessity / automatically good, but they are not the real thing), I want virtual keyboards with actual native Wayland support, please :(

bjoern_tantau@swg-empire.de on 19 Apr 2024 18:48 next collapse

I’m not even sure if any of the 3? 4? Wayland protocols allow for a fully featured osk. So this actually feels like the best outcome.

CalcProgrammer1@lemmy.ml on 19 Apr 2024 20:45 next collapse

Squeekboard is where it’s at. By far my favorite onscreen keyboard for Linux and mainly because you can easily create your own layouts using .yaml files. I’m tired of virtual keyboards that omit keys needed for development and terminal use or shove them off to separate tabs. My custom Squeekboard layout fits my needs exactly and I’m pretty fast at typing on it (typing this on it now). I wish it were usable outside of Phosh, though tbf I haven’t tried. Between GNOME Mobile, KDE Plasma Mobile, and Phosh (Squeekboard), I choose Phosh primarily because of how much I like Squeekboard.

boredsquirrel@slrpnk.net on 19 Apr 2024 22:37 next collapse

Yay a Git repo without screenshots

[deleted] on 20 Apr 2024 14:49 collapse

.

semperverus@lemmy.world on 20 Apr 2024 00:14 collapse

Maliit has explicit wayland support and has a kcm

bjoern_tantau@swg-empire.de on 20 Apr 2024 00:24 collapse

The problems with Maliit are that it lacks special keys like Ctrl, Alt, Tab, Esq, F1-F12, etc. And you cannot invoke it by yourself to type in XWayland applications or others which don’t pull up the keyboard by themselves.

The Gnome keyboard seems to be better in that regard but I couldn’t even find its name to pull it up outside of Gnome.

semperverus@lemmy.world on 20 Apr 2024 00:57 next collapse

Cool. They didnt ask for a fully-featured keyboard, they asked for a wayland-compatible onscreen keyboard.

bjoern_tantau@swg-empire.de on 20 Apr 2024 08:33 collapse

In that case please state which Wayland support it has. That’s the beauty of standards, there are so many to choose from. And in the case of Wayland keyboards you have to know which one the keyboard and which the compositor supports, making it extra easy for the user.

Zamundaaa@discuss.tchncs.de on 20 Apr 2024 12:13 collapse

And you cannot invoke it by yourself to type in XWayland applications

Yes you can

bjoern_tantau@swg-empire.de on 20 Apr 2024 12:33 collapse

How?

I mean, I got a different solution by now, but would be nice to know for the future.

Zamundaaa@discuss.tchncs.de on 21 Apr 2024 11:21 collapse

When you have a Xwayland app focused, the Plasma panel will have an upward facing arrow in the system tray. If you tap it, the virtual keyboard will pop up

bjoern_tantau@swg-empire.de on 21 Apr 2024 12:42 collapse

Not on Plasma Desktop. Maybe on Mobile. But I was not able to find out how to get it to Desktop.

Zamundaaa@discuss.tchncs.de on 21 Apr 2024 13:19 collapse

I am talking about the desktop. Mobile doesn’t have a system tray.

bjoern_tantau@swg-empire.de on 21 Apr 2024 14:12 collapse

What distribution? No such thing for me with Plasma 6 on OpenSUSE Tumbleweed.

Zamundaaa@discuss.tchncs.de on 22 Apr 2024 17:02 collapse

Fedora. Though I just tested it again and the input method icon is now hidden by default, and does not automatically show up when appropriate :|

You can make it always be shown in the system tray configuration, but this should really work out of the box…

[deleted] on 19 Apr 2024 22:04 next collapse

.

wingsfortheirsmiles@feddit.uk on 19 Apr 2024 22:04 next collapse

Edit: ignore comment, didn’t realise it was about the Deck initially!

ReversalHatchery@beehaw.org on 19 Apr 2024 22:57 next collapse

That sounds great!

What version of Plasma does it require, though?

And how is it able to inject key events with extest? Does it use some wayland feature to get permission to do so, or does it do some kind of workaround like the uinput trick?

bjoern_tantau@swg-empire.de on 19 Apr 2024 23:22 collapse

I tested it on Plasma 6. If I interpret the extest Readme correctly it uses the uinput trick. So I guess that it works with older versions as well. Maybe without the plasma integration.

ReversalHatchery@beehaw.org on 20 Apr 2024 11:30 collapse

Oh. Does that mean that I need to open up the permissions of /dev/uinput for this to work?

bjoern_tantau@swg-empire.de on 20 Apr 2024 12:32 collapse

Look at the extest readme, everything is there.

ReversalHatchery@beehaw.org on 20 Apr 2024 12:45 collapse

Sorry, didn’t realize that the link is to extest’s repo.

It seems that this actually undoes wayland’s protection against any program inserting fake input events, and it does not only allow onboard to do so.

I thought that it was already possible with onboard, with selecting uinput instead of xtest in the settings. Never tried though, because I didn’t want to undo that security measure.

bjoern_tantau@swg-empire.de on 20 Apr 2024 20:28 collapse

I’ll have to try the uinput setting. Maybe the workaround isn’t needed after all. Or at least it doesn’t have to be so convoluted.

But yeah, it’s really just a dirty placeholder until we can get a proper solution in the next 50 years or so.

mariah@feddit.rocks on 12 Jul 2024 03:05 collapse

how do i compile as 64bit