Created
December 29, 2021 12:30
-
-
Save mixalbl4-127/d7391ee114d22eacc4b2eac750f53c42 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
sleep 5 | |
for Id in $(xinput --list | grep "A4TECH USB" | grep -oE "id=[0-9]{1,2}" | grep -oE "[0-9]{1,2}") | |
do | |
#if [ "$(xinput --list-props $Id | grep -oE "\"Rel Horiz Wheel\"")" ] | |
if [ "$(xinput --list-props $Id | grep -oE "Button Scrolling Button Default")" ] | |
then | |
buttonId=$Id | |
fi | |
done | |
sleep 5 | |
xinput --disable $buttonId | |
sleep 5 | |
tEvent=$(xinput --list-props $buttonId | grep -oE "event+[0-9]{1,3}") | |
pkill -f -9 "evtest /dev/input/$tEvent" | |
evtest /dev/input/$tEvent | awk '/KEY_LEFTMETA), value 1/ {system("xdotool click --repeat 2 1")}' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment