pop-os / cosmic-epoch

Next generation Cosmic desktop environment
3.23k stars 88 forks source link

Touchscreen support meta-issue #241

Open ids1024 opened 8 months ago

ids1024 commented 8 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 8 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 5 months 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.

ahoneybun commented 5 months ago

From testing the cosmic-panel PR and I think that pulls in the xdg-shell-wrapper one the only issues so far are:

ninjaquick commented 3 months ago

Touch inputs do not map to the correct display (I can create a new item if this is something that's expected to be working):

Behaviors to compare to:

Use cases to consider this:

My personal use-case is I have a secondary system at my desk which is a laptop and the above 27" monitor. I use is as a more natural input for webapps, multimedia, discord calling/other calling apps, some tinkering to make more flexible and interesting gameglass-like solutions.

I am not sure about wacom, if it natively combines the taps, but this could be something that needs to be handled if wacom/drawing tablets require this type of care. I don't have a device of this kind to test with.

Vixeliz commented 3 months ago

I don't know if this would be out of the scope and stay seperate (ie like lisgd). But having remappable touchscreen gestures would also be very cool

Quackdoc commented 1 day ago

@ninjaquick missed this a while ago, you can bind to specific display.

Get device name: libinput list-devices | grep Device\: ... Device: ILITEK ILITEK-TP ...

.config/cosmic/com.system76.CosmicComp/v1/input_devices
----------------------------
{
 "ILITEK ILITEK-TP": (
    state: Enabled,
    map_to_output: Some("HDMI-A-2")
    ),
}