lxqt / lxqt-config

Tools to configure LXQt and the underlying operating system
https://lxqt.github.io
GNU Lesser General Public License v2.1
86 stars 60 forks source link

Touchpad Settings (Request) #405

Closed intialonso closed 3 years ago

intialonso commented 10 years ago

This is more a request than a bug.

In the mouse settings theres no options for touchpads (vertical and horizontal scroll, tap, etc). It will be great if the option could be included in the settings app.

jleclanche commented 10 years ago

Accepted

fedelibre commented 9 years ago

+1, this would be very nice to have

PCMan commented 9 years ago

Does anyone know how to do that?

fedelibre commented 9 years ago

perhaps you can get some ispiration from gnome-control-center

Vladimir-csp commented 9 years ago

A humble request: while taking ideas from gnome stuff, try to avoid oversimplification. Some time ago I've tried to convince them to make decent mouse speed and acceleration settings. In the end they changed two non-working sliders into one which does magic with no way to tell where speed setting ends and acceleration setting begins.

jleclanche commented 9 years ago

@Vladimir-csp When making UX decisions I try to make the interface as simple as possible without removing actual functionality.

Atalanttore commented 9 years ago

Can you please turn off tapping by default? It's annoying and unnecessary.

Vladimir-csp commented 9 years ago

Touchpad settings are usually just xinput properties of the device. No need for any special treatment. IMHO this should be merged into #337

RalfJung commented 8 years ago

Is there any other configuration tool one could use? I tried the one from GNOME, but enabling "tap to click" there does nothing. I tried the one from KDE, but so far I was unable to even load it:

$ kcmshell5 kcm_touchpad
"kcm_touchpad" should not be loaded.
Could not find module 'kcm_touchpad'. See kcmshell5 --list for the full list of modules.

Not being able to tap to click is a pretty severe regression, compared to the DEs I used previously.

EDIT: I solved this for now by editing the Xorg configuration. Better than nothing.

palinek commented 8 years ago

There is a synclient cmd line tool for the synaptics. Do we want to make a GUI based on that? (like it is with setxkbmap in lxqt-config-input)

Vladimir-csp commented 8 years ago

There is a synclient cmd line tool for the synaptics. Do we want to make a GUI based on that? (like it is with setxkbmap in lxqt-config-input)

IMHO, not before proper xinput frontend/daemon (#337).

...some of touchpad properties are exposed via xinput anyway.

pmattern commented 8 years ago

Tools synclient as well as syndaemon are geared towards xf86-input-synaptics only. They don't work with any other driver like e. g. xf86-input-libinput so we shouldn't rely on them.

AFAIK the common way to tweak input device settings in realtime are Device Properties so we'd better use these as backend. Don't know whether this has to be done via binary xinput or whether there's some library or so to access them. Also, I'm not sure which Device Properties exactly should be supported as these are completely different depending on the driver in use. libinput will probably be used under Wayland as well, synaptics is providing a lot more features for the time being, supporting both would probably mean much more work.

Also, I don't know how that whole thing will be implemented in Wayland, in particular whether the concept of Device Properties will persist. If Wayland is relying on different concepts I'm not sure whether effort should be put into the current X Window System concepts, besides a GUI to configure touchpads is for sure a feature missing badly.

Vladimir-csp commented 8 years ago

Breaking it apart: there is a need for input device configuration tool. This tool would work with a range of properties, grouped in profiles which would be applied to devices.

It would be logical to generalize properties and create a list of known properties with (translatable) descriptions.

The config tool would take a list of available properties, compare it to a list of known properties, then show known ones on the 'main' tab, all other on 'advanced' tab.

Where would it take all these properties? That depends on backends. Wayland is maturing, but it is still not mainstream, nor has stable interfaces. So xinput is the thing to start with (via binary or library, does not matter).

The plus side of this approach is that it would provide GUI access to any property backend can give. In case of xinput it is very impressive list, sufficient to handle a touchpad:

$ xinput list-props 14
Device 'AlpsPS/2 ALPS GlidePoint':
    Device Enabled (137):   1
    Coordinate Transformation Matrix (139): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
    Device Accel Profile (270): -1
    Device Accel Constant Deceleration (271):   2.500000
    Device Accel Adaptive Deceleration (272):   1.000000
    Device Accel Velocity Scaling (273):    12.500000
    Synaptics Edges (294):  300, 1700, 210, 1190
    Synaptics Finger (295): 12, 15, 0
    Synaptics Tap Time (296):   180
    Synaptics Tap Move (297):   107
    Synaptics Tap Durations (298):  180, 100, 100
    Synaptics ClickPad (299):   0
    Synaptics Middle Button Timeout (300):  75
    Synaptics Two-Finger Pressure (301):    141
    Synaptics Two-Finger Width (302):   7
    Synaptics Scrolling Distance (303): 48, 48
    Synaptics Edge Scrolling (304): 0, 0, 0
    Synaptics Two-Finger Scrolling (305):   1, 1
    Synaptics Move Speed (306): 1.000000, 1.750000, 0.081934, 0.000000
    Synaptics Off (307):    0
    Synaptics Locked Drags (308):   0
    Synaptics Locked Drags Timeout (309):   5000
    Synaptics Tap Action (310): 0, 0, 0, 0, 1, 2, 3
    Synaptics Click Action (311):   1, 1, 1
    Synaptics Circular Scrolling (312): 0
    Synaptics Circular Scrolling Distance (313):    0.100000
    Synaptics Circular Scrolling Trigger (314): 0
    Synaptics Circular Pad (315):   0
    Synaptics Palm Detection (316): 0
    Synaptics Palm Dimensions (317):    10, 100
    Synaptics Coasting Speed (318): 20.000000, 50.000000
    Synaptics Pressure Motion (319):    15, 80
    Synaptics Pressure Motion Factor (320): 1.000000, 1.000000
    Synaptics Grab Event Device (321):  0
    Synaptics Gestures (322):   1
    Synaptics Capabilities (323):   1, 1, 1, 1, 1, 1, 0
    Synaptics Pad Resolution (324): 32, 25
    Synaptics Area (325):   0, 0, 0, 0
    Synaptics Noise Cancellation (326): 12, 12
    Device Product ID (260):    2, 8
    Device Node (261):  "/dev/input/event1"

Everything I wrote here is just a clarification of the concept already described in #337

billwx commented 8 years ago

Not sure if this is helpful but xfce recognizes both my laptop and usb mice. I always disable the former to avoid accidentally moving my cursor about when typing. With lxde/qt i have to be much more careful about not touching the trackpad. Such an option would be a great addition to a great desktop. Thanks for your consideration!

tsujan commented 8 years ago

With lxde/qt i have to be much more careful about not touching the trackpad

Until that option is added, if your touchpad works with Synaptics driver, you could add this to your startup:

#!/bin/bash
synclient TouchpadOff=1
exit

or to keyboard shortcuts.

josephg5 commented 8 years ago

with xinput

$ xinput --list $ xinput --list-props "SynPS/2 Synaptics TouchPad"

$ xinput --set-prop "SynPS/2 Synaptics TouchPad" "libinput Tapping Enabled" 1

billwx commented 8 years ago

On my Dell Latitude e5420 running the latest (arch-based) Antergos and LxQt, xinput says unable to find SynPS/2 Synaptics TouchPad. ANy further advice? Is it possible my machine is using a different touchpad? Many thanks!


From: Joseph George notifications@github.com Sent: Saturday, August 6, 2016 4:30 PM To: lxde/lxqt Cc: billwx; Comment Subject: Re: [lxde/lxqt] Touchpad Settings (Request) (#92)

with xinput

$ xinput --list $ xinput --list-props "SynPS/2 Synaptics TouchPad"

$ xinput --set-prop "SynPS/2 Synaptics TouchPad" "libinput Tapping Enabled" 1

You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/lxde/lxqt/issues/92#issuecomment-238049764, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ASXqHGUcH_hUqPVRXRhS-sUyGkgFueHVks5qdPzjgaJpZM4B5ysj.

stefonarch commented 8 years ago

Sometimes non-synaptis touchpads are recognised only as mouse, you can see the model with $ xinput list

Better you search on the net specific solutions for your laptop model, it's not related in any way to LQXt.

billwx commented 8 years ago

I respectfully disagree. Certainly the way to disable a trackpad is related to one's operating system?

However, thank you for the tip on "xinput list". Using that command,and previous instructions from Joseph George, i disabled the trackpad on my Dell Latitude e5420 by...

xinput --set-prop "AlpsPS/2 ALPS GlidePoint" "Device Enabled" 0


From: Stefano Binde notifications@github.com Sent: Friday, August 19, 2016 9:58 AM To: lxde/lxqt Cc: billwx; Comment Subject: Re: [lxde/lxqt] Touchpad Settings (Request) (#92)

Sometimes non-synaptis touchpads are recognised only as mouse, you can see the model with $ xinput list

Better you search on the net specific solutions for your laptop model, it's not related in any way to LQXt.

You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/lxde/lxqt/issues/92#issuecomment-241041934, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ASXqHA1jyjb_4kW-VZ4rOHuVw5iQjUB4ks5qhcSpgaJpZM4B5ysj.

stefonarch commented 8 years ago

I respectfully disagree. Certainly the way to disable a trackpad is related to one's operating system?

Yes, but in case the trackpad is not recognised by the kernel there is no DE which makes miracles.

yan12125 commented 8 years ago

Following the idea of @josephg5 and description on https://bbs.archlinux.org/viewtopic.php?id=210096, this is how I change my scrolling method to edge-scrolling:

xinput --set-prop "ETPS/2 Elantech Touchpad" "libinput Scroll Method Enabled" 0, 1, 0

libinput provides some configuration APIs, which seems promising: https://wayland.freedesktop.org/libinput/doc/latest/group__config.html

yan12125 commented 8 years ago

In response to @fedelibre:

perhaps you can get some ispiration from gnome-control-center

In brief: X11-specific codes seem inevitable for implementing this

Take tap-to-click for eample: gnome-control-center sends configurations to gnome-settings-daemon (gsd) [1]. On the other hand, mutter subscribes the setting from gsd [2]. Mutter then sends an X11 Atom to Xorg server to change the setting. [3]

(PS. I'm new to GTK+/GLib. The conclusion above is from 2-hour reading of GNOME codes, which may be wrong)

libinput settings are context-wise. That is, settings in a process are independent from another process. As a result, for LXQt running on Xorg, lxqt-config needs to use the X protocol to change those settings. That's a bad news for a desktop environment aiming to support wayland.

[1] https://git.gnome.org/browse/gnome-control-center/tree/panels/mouse/gnome-mouse-properties.c#n285 [2] https://git.gnome.org/browse/mutter/tree/src/backends/meta-input-settings.c#n457 [3] https://git.gnome.org/browse/mutter/tree/src/backends/x11/meta-input-settings-x11.c#n214

yan12125 commented 7 years ago

I have a quick implementation at https://github.com/lxde/lxqt-config/pull/109. Hope everyone can have a test as it's highly hardware-dependent and I'm not sure if things are still working with different configurations.

Luraktinus commented 6 years ago

i wanna see that too, the buttons on my touchpad are broken and barely work... tapping is the only way for me (also its way more comfy)

tsimonq2 commented 6 years ago

I am assigning this to myself, because I am declaring it a feature goal for Lubuntu 19.04. Anyone is welcome to discuss the implementation or implement it (in fact, I would encourage @yan12125 to finish their PR), but I'd like to put in the work to get it mergable in time for 19.04.

tsimonq2 commented 6 years ago

I'll also assign to @yan12125.

yan12125 commented 6 years ago

@tsimonq2 Is there a feature-freeze deadline for Lubuntu 19.04?

tsimonq2 commented 6 years ago

@tsimonq2 Is there a feature-freeze deadline for Lubuntu 19.04?

Mid-to-late February.

Vladimir-csp commented 6 years ago

IMHO this should be merged into #337. Touchpad is just another xinput device among others.

yan12125 commented 6 years ago

IMHO this should be merged into #337. Touchpad is just another xinput device among others.

It should be fine to attack touchpad settings first. That's one of the most common use cases.


As a side note, to make device settings working on Wayland, device-handling codes should be in the compositor as libinput states are local to a process. That would be an issue if LXQt wants to be compatible with major Wayland compositors - I don't think Mutter and KWin provide the same interface for device settings. That's why my prototype https://github.com/lxqt/lxqt-config/pull/109 uses XInput2 instead of libinput.

josephg5 commented 6 years ago

libinput states are local to a process

not! libinput states are global. You do not need to change states for every process or program.

Vladimir-csp commented 6 years ago

It should be fine to attack touchpad settings first. That's one of the most common use cases.

It doesn't really matter, frontend would just show knobs provided by backend for devices. I'm against any special treatment except giving fancy translatable labels in the UI to some known knobs, while putting all other knobs into 'advanced' tab.

ghost commented 6 years ago

I've been looking into this a little bit lately... anyone know of any "hello world" libinput tutorials out there? perhaps any simple programs using libinput, I did see the API but there were no tutorials on how to initialize the devices, etc.. perhaps I just missed something in my overview scan of the API.

yan12125 commented 5 years ago

I merged https://github.com/lxqt/lxqt-config/pull/109 to allow easier testing. Any improvement on functionality & UI is welcome :)

tsujan commented 5 years ago

@yan12125 Thanks a lot! Now, an Apply button can be added consistently.

tsujan commented 5 years ago

@yan12125 There's a small mistake in the layout, which I'll fix in my apply-button patch.

tsujan commented 5 years ago

Yet another thing:

As @Vladimir-csp correctly said, "Touchpad is just another xinput device among others." I'm sure this is discussed elsewhere and I might have already attached a screenshot like this:

touchpad

As you see, my wireless mouse is in the Touchpad section, although the acceleration speed is correct (it's behind the combo popup menu and isn't shown in the screenshot).

I know that this was the first step but it might need some changes after V0.14.0.

yan12125 commented 5 years ago

Oh, I forgot to change all words with "touchpad". Will do after apply/close.

tsujan commented 5 years ago

Will do after apply/close.

I'll do it. What word should I use? "Other Input Devices"? Either I have a strong deja vu or we've already talked about this ;)

yan12125 commented 5 years ago

Currently only mice and touch pads are supported. I'm not sure if there will be other devices in this page as their properties are quite different. (You don't scroll with you keyboard!) I'd call it "Mouse and Touchpad Devices", and rename the first page to "Global Mouse Settings" in case of confusion.

By the way, in the long term, options in the original "Mouse" page might be merged into the new page I've just added as the world is moving from global (X11) to per-device (libinput) settings.

we've already talked about this ;)

I guess you want this - https://github.com/lxqt/lxqt/issues/337

tsujan commented 5 years ago

OK, I'll go with "Mouse and Touchpad Devices".

I found another issue (curDevice isn't updated in touchpadconfig.cpp). I'll make a PR soon and ask you to review it -- it's better to fix these little issues before the next release and the apply-button PR.

hmollercl commented 5 years ago

Could you change the "Single click to activate items" with something like "tap to click" in the ui?

tsujan commented 5 years ago

Could you change the "Single click to activate items" with something like "tap to click" in the ui?

I agree with this. @yan12125, is it acceptable to you? Or there's a case of single-click that's covered by it?

agaida commented 5 years ago

Guess it is swapped over from mouse configuration

tsujan commented 5 years ago

Guess it is swapped over from mouse configuration

Most probably. It should be "Tap to click" and it's better to put "Tap to drag" below it.

tsujan commented 5 years ago

Oh, "Tap to drag" may need be "Tap twice to drag". Confusing...

yan12125 commented 5 years ago

is it acceptable to you?

Sure! The replacement sounds more intuitive :)

Oh, "Tap to drag" may need be "Tap twice to drag". Confusing...

I guess I missed "twice" as the underlying libinput attribute is called LIBINPUT_PROP_TAP_DRAG. Feel free to add "twice"!

tsujan commented 5 years ago

I guess I missed "twice"

@yan12125 I'm not even sure if "twice" is correct here. Dragging isn't done by a simple tapping, of course, but it isn't done by double tapping either because, the second time, the finger remains on touchpad.

The easiest way of finding correct terms is launching KDE settings. I'll do that later and make a pedantic PR ;) The important thing is that LXQt touchpad settings work well.

tsujan commented 5 years ago

I think this prevents confusion: https://github.com/lxqt/lxqt-config/pull/460

"Tap and drag" is "Tap-and-drag" in KDE.

tsujan commented 5 years ago

An option to disable the touchpad...

Oh, it's missing! It would be a nice addition.