Following are now two scripts which work without generating error msgs. The 1st is the one discussed so far. The 2nd one works and seem to make the change permanent - I could not get back to a condition where the USB joysticks affected the mouse cursor. And of course, this is just fine since it is the condition I want. But it would be interesting to know where the change took place. Also, I was hoping to use the 2nd option on a second computer I have, but USB joystick activity was already separated from the mouse cursor. I do not know why as I had not yet looked at the separation issue on the 2nd computer.
Option 1 (do for each boot):
Code:
#!/bin/bash
NAME="WAILLY PPM"
ids=$(xinput list | grep $NAME | grep -o -e "id=.." | xargs | sed "s/id=//g")
for id in $ids; do
echo "Disabling Mouse/Key events for ID $id"
xinput set-prop $id "WAILLY PPM" "Generate Mouse Events" 0
xinput set-prop $id "WAILLY PPM" "Generate Key Events" 0
done
Option 2 (which seems to make a permanent change):
Code:
#!/bin/bash
NAME='WAILLY PPM'
ids=$(xinput list | grep "$NAME" | grep -o -e "id=.." | xargs | sed "s/id=//g")
for id in $ids; do
echo "Disabling Mouse/Key events for ID $id"
xinput set-prop $id "WAILLY PPM" "Device Enabled" 0
done
Bookmarks