[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-xorg
Subject:    Re: Disable move in synaptics
From:       Vincent Bernat <bernat () luffy ! cx>
Date:       2014-06-15 12:13:33
Message-ID: 87ppia4bgy.fsf () zoro ! exoscale ! ch
[Download RAW message or body]

=E2=9D=A6 15 juin 2014 13:48 +0200, Vincent Bernat <bernat@luffy.cx>=C2=A0:

> I got a Carbon X1 which features a trackpoint and a clickpad. I am an
> heavy user of the trackpoint. In previous models, it was possible to
> scroll using the trackpoint and the middle button. Unfortunately, with a
> clickpad, there is no physical buttons anymore and since the driver
> managing the trackpoint and the one managing the clickpad are different,
> it seems a bit difficult to implement properly.
>
> As an alternative, I would like to configure the clickpad such that only
> clicks and scrolling using two-finger scrolling are enabled. For clicks,
> I use:
>
>         # [    12.756] (--) synaptics: SynPS/2 Synaptics TouchPad: x-axis=
 range 1472 - 5112 (res 42)
>         # [    12.756] (--) synaptics: SynPS/2 Synaptics TouchPad: y-axis=
 range 1408 - 3834 (res 42)
>         # The following is 60% 0 0 0 40% 60% 0 0
>         # The logic is explained here:
>         #  http://who-t.blogspot.de/2013/12/lenovo-t440-touchpad-button.h=
tml
>         xinput set-prop $device 'Synaptics Soft Button Areas' 3656 0 0 0 =
2928 3656 0 0
>         xinput set-prop $device 'Synaptics Area' 1 1 1 1
>
> However, I also lost the ability to use two-finger scroll.
>
> Would it be possible to disable movement while keeping the two-finger
> scroll? I don't care about the area used by soft buttons: I can restrict
> them to the top area of the clickpad.

I made this quick patch to solve this issue for me. I use it with:

xinput set-prop $device 'Synaptics Soft Button Areas' 3656 0 0 0 2928 3656 =
0 0
xinput set-prop $device 'Synaptics Off' 3

Works for me.


[Attachment #3 (text/x-diff)]

Index: xserver-xorg-input-synaptics-1.8.0/src/properties.c
===================================================================
--- xserver-xorg-input-synaptics-1.8.0.orig/src/properties.c
+++ xserver-xorg-input-synaptics-1.8.0/src/properties.c
@@ -603,7 +603,7 @@ SetProperty(DeviceIntPtr dev, Atom prope
 
         off = *(CARD8 *) prop->data;
 
-        if (off > 2)
+        if (off > 3)
             return BadValue;
 
         para->touchpad_off = off;
Index: xserver-xorg-input-synaptics-1.8.0/src/synaptics.c
===================================================================
--- xserver-xorg-input-synaptics-1.8.0.orig/src/synaptics.c
+++ xserver-xorg-input-synaptics-1.8.0/src/synaptics.c
@@ -3125,6 +3125,7 @@ HandleState(InputInfoPtr pInfo, struct S
         priv->last_button_area = NO_BUTTON_AREA;
 
     ignore_motion = para->touchpad_off == TOUCHPAD_OFF ||
+        para->touchpad_off == TOUCHPAD_MOTION_OFF ||
         (!using_cumulative_coords && priv->last_button_area != NO_BUTTON_AREA);
 
     /* these two just update hw->left, right, etc. */
Index: xserver-xorg-input-synaptics-1.8.0/src/synapticsstr.h
===================================================================
--- xserver-xorg-input-synaptics-1.8.0.orig/src/synapticsstr.h
+++ xserver-xorg-input-synaptics-1.8.0/src/synapticsstr.h
@@ -63,6 +63,7 @@ enum OffState {
     TOUCHPAD_ON = 0,
     TOUCHPAD_OFF = 1,
     TOUCHPAD_TAP_OFF = 2,
+    TOUCHPAD_MOTION_OFF = 3,
 };
 
 enum TapEvent {
Index: xserver-xorg-input-synaptics-1.8.0/man/synaptics.man
===================================================================
--- xserver-xorg-input-synaptics-1.8.0.orig/man/synaptics.man
+++ xserver-xorg-input-synaptics-1.8.0/man/synaptics.man
@@ -263,6 +263,7 @@ l l.
 0	Touchpad is enabled
 1	Touchpad is switched off (physical clicks still work)
 2	Only tapping and scrolling is switched off
+3       Only motion is switched off
 .TE
 When the touchpad is switched off, button events caused by a physical
 button press are still interpreted. On a ClickPad, this includes


-- 
Don't stop with your first draft.
            - The Elements of Programming Style (Kernighan & Plauger)


_______________________________________________
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
Your subscription address: %(user_address)s

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic