Skip to content

Instantly share code, notes, and snippets.

View yinonburgansky's full-sized avatar

Yinon Burgansky yinonburgansky

View GitHub Profile
@yinonburgansky
yinonburgansky / windows-acceleration-function.py
Last active March 9, 2024 19:04
windows acceleration function
# calculation are based on http://www.esreality.com/index.php?a=post&id=1945096
# assuming windows 10 uses the same calculation as windows 7.
# guesses have been made calculation is not accurate
# touchpad users make sure your touchpad is calibrated with `sudo libinput measure touchpad-size`
# import matplotlib.pyplot as plt
import struct
# set according to your device:
xinput_device_id = 13
device_dpi = 1000 # mouse dpi