Code: Select all
SetCapsLockState, AlwaysOff
desktop = 1
Switch(d)
{
global
press := (d-desktop)
desktop = %d%
If press < 0
direction = Left
else if press > 0
direction = Right
else
return
press := Abs(press)
Loop, %press%
{
SendInput, ^#{%direction%}
Sleep, 75
}
return
}
CapsLock & 1::
Switch(1)
return
CapsLock & 2::
Switch(2)
return
CapsLock & 3::
Switch(3)
return
CapsLock & 4::
Switch(4)
return
^#Left::
SendInput ^#{Left}
If desktop > 1
desktop--
return
^#Right::
SendInput ^#{Right}
If desktop < 4
desktop++
return