Advertisement
bystander36

DPI-Shift work around

Mar 26th, 2019
1,070
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.97 KB | None | 0 0
  1. --[[
  2. This script lowers the DPI when you press the right mouse button.
  3.  
  4. Along with adding this script to your profile, you must also do 2 things:
  5. 1) Add the macros "DPI Up" and "DPI Down" to Commands list in the profile, using the mouse functions option.
  6.     These macros are not to be assigned to any buttons.  They just need to be created and sitting in the
  7.     list of commands on the left side of the macro section of this profile.
  8. 2) You need to create at least 2 DPI settings in the mouse settings of the profile.  The default needs to be
  9.     a higher number than at least one other DPI setting.
  10.  
  11. When you press the right mouse button, while the profile is active, it will lower the mouse sensitivity
  12. to a lower DPI setting, and change it back once released.
  13. ]]--
  14.  
  15. function OnEvent(event, gkey, family)
  16.     if event == "MOUSE_BUTTON_PRESSED" and gkey == 2 then
  17.         PlayMacro("DPI Down")
  18.     elseif event == "MOUSE_BUTTON_RELEASED" and gkey == 2 then
  19.         PlayMacro("DPI Up")
  20.     end
  21. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement