piusare/mausu.ahk

89 lines
1.8 KiB
AutoHotkey

#MaxThreadsPerHotkey 1
;;WINDOOOOOOOOOOOOOOOOOOOOOOOOOOOOOWS y ahk unaware del futuro de los escritorios
;;https://www.autohotkey.com/boards/viewtopic.php?t=97706
DllCall("SetThreadDpiAwarenessContext", "ptr", -3, "ptr")
;;For debugging purposes, it controls nothing, as it happens to us all with the flow of our lives
mouseActive := 0
rightMov := 0
lefMov := 0
upMov := 0
downMov := 0
speedUp := 1
speedUpFactor := 20
mouseSpeed := speedUp * speedUpFactor + 3
inputCleaning()
{
;;if (GetKeyState("RShift", "P") != 0) {
;; SendInput, {RShift Down}
;;}
if (GetKeyState("RCtrl", "P") != 0) {
SendInput, {RCtrl Down}
}
return
}
;;2 is default speed
RCtrl & Left::lefMov := -1
RCtrl & Left Up::lefMov := 0
RCtrl & Right::rightMov := 1
RCtrl & Right Up::rightMov := 0
RCtrl & Up::upMov := -1
RCtrl & Up Up::upMov := 0
RCtrl & Down::downMov := 1
RCtrl & Down Up::downMov := 0
RCtrl & /::
SendInput, {RCtrl Up}
speedUp := !(speedUp)
mouseSpeed := speedUp * speedUpFactor + 3
SendInput, {RCtrl Down}
return
;;Toggle mouse action
~RCtrl::
Global mouseActive, mouseSpeed
mouseActive := 1
while (GetKeyState("RCtrl", "P") != 0) {
MouseMove, (rightMov + lefMov) * (mouseSpeed), (upMov + downMov) * (mouseSpeed), 0, R
}
mouseActive := 0
rightMov := 0
lefMov := 0
upMov := 0
downMov := 0
return
;;Mouse buttons
RCtrl & RShift::
SendInput, {RCtrl Up}
SendInput, {RShift Up}
SendInput, {LButton}
inputCleaning()
return
RCtrl & End::
SendInput, {RCtrl Up}
SendInput, {End Up}
SendInput, {RButton}
inputCleaning()
return
RCtrl & Enter::
SendInput, {RCtrl Up}
SendInput, {Enter Up}
SendInput, {MButton}
inputCleaning()
return
;;tuckaway
;;targeting 1080p displays with taskbar on top. Change at your leisure.
RCtrl & .::
MouseMove, 1940, 100
inputCleaning()
return