I had gotten this laptop as a gift/hand-me-down from someone else. Since the first thing I did was install Linux, I hadn’t thought otherwise that the buttons hadn’t been treated to well: left-click was very stubborn, often missing on some very obvious pushes. The action/response of the button resembled a sticky button. Because right-click was better, I created a script that would switch/toggle left and right click. I toggled it twice to test it (so that it reverted back to the original) when and found that left-click was working normally. Not sure why this fixed the problem and have yet to see another problem like this but I’m glad it’s good again. I created a script to quickly do this then added .desktop file to have it load on Login. The script:
#!/bin/bash
# touchpad-button-fix - toggles left and right mouse/touchpad buttons and back
# again (fixes issue with missed touchpad buttons clicks)
# Detect mouse button position, switch mouse button position, then switch back
for l in {1..2}; do
state=$(xmodmap -pp | sed -n '5p' | awk '{ print $2 }') # detect button posit.
if [ "$state" == "1" ]; then
xmodmap -e "pointer = 3 2 1" &> /dev/null
sleep 2
else
xmodmap -e "pointer = 1 2 3" &> /dev/null
fi
done
then created a touchpad-button-fix.desktop in ~/.config/autostart to start it on Login:
[Desktop Entry] Type=Application Exec=/home/$USER/Others/Computer/Scripts/bugfixes/touchpad-button-fix Icon=mousepad Hidden=false NoDisplay=false X-GNOME-Autostart-enabled=true Name=Touchpad Button Fix Comment=Switches touchpad/mouse buttons then back again (to fix missed touchpad button click bug)
Additionaly, the touchpad button may revert to it’s original behavior after resuming from sleep. To run the script upon resume it will need to be defined to pm-utils. Put this in /etc/pm/sleep.d/90_touchpad-button-fix:
#!/bin/sh # Switch touchpad/mouse buttons then back again to fix # missing trackpad button presses bug case "$1" in resume | thaw ) export DISPLAY=:0 su -c - todd /home/todd/Others/Computer/Scripts/bugfixes/touchpad-button-fix ;; esac