pop-os / cosmic-epoch

Next generation Cosmic desktop environment
1.71k stars 54 forks source link

Touchscreen support meta-issue #241

Open ids1024 opened 3 months ago

ids1024 commented 3 months ago

Cosmic-comp has support for wl_touch, passing through touchscreen events from libinput to clients that handle wl_touch.

That's the main thing that's needed to make a touchscreen on a laptop somewhat useful, but there are more things that are needed for full touchscreen support. Especially for use of tablets without keyboards.

First-class support for touchscreen-only devices isn't the highest priority, but it's something to consider.

Quackdoc commented 3 months ago

For touchscreens; It would be nice to have cosmic-settings expose touchscreen settings like display mapping. Currently on my desktop my touchscreen is unusable since it isn't mapped, IIRC I saw some settings for it in cosmic-comp? but i'm not sure they are exposed anywhere.

For OSKs; It would be nice if it's a more... Flexible solution. I'm not really sure how OSKs are handled on wayland in general. though I thought it was just the text-input protocol and then up to the compositor but I often find references to QT_IM modules and what not

However the current status quo is a massive pain point for a lot of people, myself included. OSKs are often require platform specific invocation despite actually being relatively flexible. To give examples, Phosh relies on their OSK0 dbus interface and requires users to use a bridge/shim application to get other keyboards working. Plasma only really works with mallit/mallit only really working with plasma etc. wf-osk is pretty basic and im not even sure if wayfire uses it or not, same with wvkbd.

Meanwhile actually triggering and dismissing OSKs are generally easy, Squeekboard can be triggered and dismissed with busctl call --user sm.puri.OSK0 /sm/puri/OSK0 sm.puri.OSK0 SetVisible b {true,false} wvkbd can be triggered and dismissed with kill -{USR1,USR2} $(pgrep -x "wvkbd-mobintl") wf-osk I believe you just trigger it and dismiss it by killing it and starting it.

Being able to choose an appropriate OSK would be a really nice feature that doesn't really work on other compositors. Personally I really like wvkbd and find squeeboard really hard to use, but I know many people prefer maliit, squeekboard etc.

I've tested both squeekboard and wvkbd. The OSKs I've tested were dismissed for some reason when I tried to use them with firefox. (though wvkbd worked when I retriggered it) However they both worked when interacting with cosmic-term and telegram. wvkbd-mobintl -L 200 (-L is landscape height) currently for testing.

As for manually showing and dismissing keyboards that can easily be done using an applet.

ids1024 commented 2 weeks ago

Touch input was added to iced-sctk in https://github.com/pop-os/iced/pull/135.

For cosmic-panel, this will require https://github.com/pop-os/xdg-shell-wrapper/pull/22 and https://github.com/pop-os/cosmic-panel/pull/199.