Skip to content

Instantly share code, notes, and snippets.

@foone
Last active April 3, 2019 09:32
Show Gist options
  • Save foone/a07b241b72d01c8caa00e142daf93174 to your computer and use it in GitHub Desktop.
Save foone/a07b241b72d01c8caa00e142daf93174 to your computer and use it in GitHub Desktop.
Script to fix the button mapping for the Wesdar X5 USB Mouse's side buttons.
#!/bin/sh
# If a Wesdar X5 USB Mouse is detected, fix the mapping of the left and right keys.
# Tested on xubuntu 18.10
USB_ID='258a:0017'
if lsusb | grep -q $USB_ID
then
echo 'found'
xmodmap -e 'pointer = 1 2 3 4 5 6 7 9 8 10 11 12'
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment