[ltp] Re: E520 - turn off touch pad

Vincent Bernat linux-thinkpad@linux-thinkpad.org
Mon, 08 Sep 2014 18:53:49 +0200


--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

 =E2=9D=A6  6 septembre 2014 07:58 -0700, HeyJim <Jim.Sheetz@gmail.com>=C2=
=A0:

> I've always been able to turn the touch pad off and on in Mint 17 64 bit,=
 but
> when I do, it also turns off the buttons. The Trackpoint device also uses
> those buttons. I've tried all the options mentioned here. Any
> suggestions?

I am using this patch. I am surprised that synclient could turn the
touchpad off while keeping the soft buttons functional, but I didn't
test.


--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline; filename=04-touchpadd-off.patch

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

--=-=-=
Content-Type: text/plain


-- 
Localise input and output in subroutines.
            - The Elements of Programming Style (Kernighan & Plauger)

--=-=-=--