Last active
August 23, 2022 11:00
-
-
Save v-dimitrov/8814153 to your computer and use it in GitHub Desktop.
touchpad fn key fix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# toggle touch pad | |
device=`xinput list --name-only | grep -i touchpad` | |
isOn=`xinput list-props "$device" | grep -i enabled | tail -c 2` | |
iconEnabled='input-touchpad-symbolic' | |
iconDisabled='touchpad-disabled-symbolic' | |
case "$isOn" in | |
0) | |
notify-send --icon=$iconEnabled "Touchpad [ON]" "Your touchpad is now enabled" | |
xinput set-prop "$device" 'Device Enabled' 1 | |
;; | |
1) | |
notify-send --icon=$iconDisabled "Touchpad [OFF]" "Your touchpad is now disabled" | |
xinput set-prop "$device" 'Device Enabled' 0 | |
;; | |
*) | |
notify-send --icon=$iconEnabled --expire-time=10000 "Error: Touchpad device enabled says: $isOn." | |
;; | |
esac |
In 2021, this still does the trick. But how do you manage to set the fn key?
Thank you a lot!
But I found some strange behavior.
If "Disable touchpad when typing" is checked script did not turn touchpad on.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
work on my ubuntu 16.04 using xfce4.
perfect 💯 thank you!