06-19-2017, 07:08 PM
(This post was last modified: 06-22-2017, 11:50 AM by colin.faulkingham.)
I am trying to figure out how to disable tap-to-click on the touchpad. Has anyone been able to disable this feature? Currently, I am just disabling the touchpad (fn+f2) while using the keyboard.
Is there a configuration option for /etc/X11/xorg.conf.d/50-pine64-pinebook-touchpad.conf that turns it off?
06-19-2017, 07:50 PM
(This post was last modified: 06-19-2017, 08:33 PM by MarkHaysHarris777.)
Basically, you tell the graphical interface to ignore the events from the touchpad; you can put that into a script.
Note: I will post the script after testing; basically the script uses 'xinput' to find the id of the HAILUCK slave pointer; on my system it is id=8. Then, xinput is used to disable it:
sudo xinput list
sudo xinput --disable 8 <==== your id may be different for HAILUCK slave pointer
To turn it back on, use:
sudo xinput --enable 8
sudo xinput list-props 8 |less
My script does all of this interactively from a terminal ; toggling the resource ON if its OFF , and OFF if its ON; you can also automate that further if you like; I find that temporarily disabling the touchpad completely is helpful when typing, and when programming.
Again; I had to tweak the script when porting to the pinebook from the synaptics T61; when I'm finished testing I will post the script here so that others may have the benefit too.
marcushh777
please join us for a chat @ irc.pine64.xyz:6667 or ssl irc.pine64.xyz:6697
( I regret that I am not able to respond to personal messages; let's meet on irc! )
06-19-2017, 09:11 PM
(This post was last modified: 06-19-2017, 11:03 PM by MarkHaysHarris777.)
The following script assumes that "xinput" is installed; it is installed on the original image but may not be present in the newer image. To check try:
sudo xinput list
To install try:
sudo apt-get install xinput
The following script has been modified to run on the 14" pinebook. It may have to be modified again for the 11.6" pinebook;
touchpad.sh
Code: #! /bin/sh
# touchpad.sh
#
# Mark H. Harris
# 2014/08/07
# 2017/06/19 (pinebook port)
#
# Enable or Disable the TouchPad based on xinput
#
# notes: assumes 'one' touchpad
# assumes xinput see man xinput
#
# usage:
# touchpad on|1 (enables)
# touchpad off|0 (disables)
#
#
# get the touchpad device number TDEVICE
for line in $(xinput list |grep -i "hailuck" |grep -i "pointer"); do
for word in $(echo $line |grep -i "id"); do
TDEVICE=$(echo $word |cut -d'=' -f2)
done
done
# get Device Enabled status for touchpad
for line in $(xinput --list-props $TDEVICE |grep "Device Enabled"); do
TPRESTAT=$(echo $line |cut -d':' -f2 |cut -d' ' -f2)
done
# set prestatus keyword based on numerical data
if [ "$TPRESTAT" = "1" ]; then
PSTATUS="enabled"
elif [ "$TPRESTAT" = "0" ]; then
PSTATUS="disabled"
else
PSTATUS="unknown"
fi
# get the touchpad name by device number
TNAME=$(xinput list --name-only $TDEVICE)
# turn enable or disable the device per input parms
echo " "
if [ "$1" = "on" ] || [ "$1" = "1" ]; then
xinput --enable $TDEVICE
echo "Enabling" $TNAME "ID="$TDEVICE "..."
echo " "
elif [ "$1" = "off" ] || [ "$1" = "0" ]; then
xinput --disable $TDEVICE
echo "Disabling" $TNAME "ID="$TDEVICE "..."
echo " "
else
echo $TNAME "ID="$TDEVICE "(currently "$PSTATUS")"
echo " "
echo "touchpad on (enables)"
echo "touchpad off (disables)"
echo " "
fi
# get current Device Enabled status for touchpad
for line in $(xinput --list-props $TDEVICE |grep "Device Enabled"); do
TCURSTAT=$(echo $line |cut -d':' -f2 |cut -d' ' -f2)
done
# display status of touchpad if the status has changed
if [ "$TCURSTAT" = "1" ]; then
TSTATUS="enabled"
elif [ "$TCURSTAT" = "0" ]; then
TSTATUS="disabled"
else
TSTATUS="unknown"
fi
if [ $PSTATUS != $TSTATUS ]; then
echo "Device Status:" $TNAME "ID="$TDEVICE "("$TSTATUS")"
echo " "
else
echo "TouchPad Status ("$TSTATUS") Unchanged"
echo " "
fi
To disable the touchpad:
./touchpad.sh off
To enable the touchpad:
./touchpad.sh on
Notes: It may be necessary to run the script with sudo.
I just spoke with Pete, looks like the 11.6" hardware also reports as HAILUCK co.ltd pointer, also device 8 by default; so this script should also run on the 11.6" touchpad, although I have not tried it yet Pete just successfully tested the script on his 11.6" pinebook with good results, unmodified.
The tap-to-click feature is a hardware feature of the touchpad; essentially, tap-to-click is a "button-1" event ! In order to disable it you would have to change the mouse properties so that button-2 is button-1, and button-1 is not active (ignored).
marcushh777
please join us for a chat @ irc.pine64.xyz:6667 or ssl irc.pine64.xyz:6697
( I regret that I am not able to respond to personal messages; let's meet on irc! )
Mark -
I appreciate your response. However, I think to turn the touchpad on and off via fn+f2 is a lot easier to do vs. running xinput --disable|enable id.
I will look into remapping the buttons as you suggested. I just wasn't sure if there was a simpler X11 configuration that would turn off tap-to-click specifically.
Thanks for your help.
(06-20-2017, 08:07 AM)colin.faulkingham Wrote: I will look into remapping the buttons as you suggested. I just wasn't sure if there was a simpler X11 configuration that would turn off tap-to-click specifically.
I was hoping that it might be a property in xinput list-props , but doesn't look like it; I played around with it using xev , and find that the tap-to-click is just a hardware automated button-1 event. So, there is no way to ignore it without ignoring button "1" also ( in X that is ).
What makes the script handy is that you can call the script under program control so that things are a little smoother than finding the function-mouse-off button. At least on the pinebook the mouse-off is available unlike some other more expensive notebooks-- the T61 for instance has no mouse-off actuator.
marcushh777
please join us for a chat @ irc.pine64.xyz:6667 or ssl irc.pine64.xyz:6697
( I regret that I am not able to respond to personal messages; let's meet on irc! )
(06-20-2017, 08:07 AM)colin.faulkingham Wrote: I appreciate your response. However, I think to turn the touchpad on and off via fn+f2 is a lot easier to do vs. running xinput --disable|enable id.
Fn+F2 is easier. However, if you save Marcus's script to your pinebook and make it executable, you can use xbindkeys (xbindkeys-gui for a GUI configurator) to trigger it from any hotkey combo you like. You'd just need to refine the script a bit more to add a toggle parameter, so you could have it simply toggle the state when called...
(06-20-2017, 08:26 AM)MarkHaysHarris777 Wrote: At least on the pinebook the mouse-off is available unlike some other more expensive notebooks-- the T61 for instance has no mouse-off actuator.
So Fn+F8 doesn't do it for you on the T61? Or does it not work because you're not running the support software for the touchpad which requires Windoze?
(06-21-2017, 03:12 AM)pfeerick Wrote: So Fn+F8 doesn't do it for you on the T61? Or does it not work because you're not running the support software for the touchpad which requires Windoze?
Yes, which is why I wrote the original script to begin with; on the T61 running Mint (gnu+linux) the Fn+F8 does not disable the trackpad like Fn+F2 does on the Pinebook; the key only works if the synaptics driver for windows is present ( just flashes and happily ignores the key ).
And as noted above, the touchpad is not really being disabled; what is happening here is that the events from the touchpad are being ignored in X, which is why it doesn't do what the OP was really looking for precisely because it ignores ALL touchpad events not just button-1 from the tap-to-click.
What would be really handy is if the tap-to-click were a configurable property (and a unique event) so that we could ignor just that one;
marcushh777
please join us for a chat @ irc.pine64.xyz:6667 or ssl irc.pine64.xyz:6697
( I regret that I am not able to respond to personal messages; let's meet on irc! )
(06-21-2017, 06:40 AM)MarkHaysHarris777 Wrote: What would be really handy is if the tap-to-click were a configurable property (and a unique event) so that we could ignor just that one; ![Blush Blush](https://forum.pine64.org/images/smilies/blush.png)
This touchpad is really poorly designed. It would be nice if there was a way to hack the firmware of this touchpad or replace it with something better. ![Sad Sad](https://forum.pine64.org/images/smilies/sad.png) Documentation from Ha iluck is non-existent.
(06-21-2017, 08:15 AM)colin.faulkingham Wrote: (06-21-2017, 06:40 AM)MarkHaysHarris777 Wrote: What would be really handy is if the tap-to-click were a configurable property (and a unique event) so that we could ignor just that one; ![Blush Blush](https://forum.pine64.org/images/smilies/blush.png)
This touchpad is really poorly designed. It would be nice if there was a way to hack the firmware of this touchpad or replace it with something better. Documentation from Hailuck is non-existent.
Yes, but here's the rub-- many expensive notebooks have this same issue ! I put that script on my daughter's Asus when she went to Luther college, and I put it on my son's HP DVD series when he went to Iowa State. My HP g6 series also has the same issue, and the same script;
And think about this, almost all notebooks put the danged touchpad in the palm rest position so that its impossible to type without causing havoc with the touchpad ! Even the Holy Mac Book Pro has the same issue. So, I think over time some of this may change; but , it doesn't look like anytime soon.
marcushh777
please join us for a chat @ irc.pine64.xyz:6667 or ssl irc.pine64.xyz:6697
( I regret that I am not able to respond to personal messages; let's meet on irc! )
|