Setting Xbutton1 and Xbutton2 for PgUp and PgDn

Discussion, questions and support.
Post Reply
cuthbertdavies
Posts: 1
Joined: Feb 29th, ’24, 08:55

Post by cuthbertdavies » Feb 29th, ’24, 08:59

Is there a way I can set up Xbutton1 and 2 so that they trigger PgUp and PgDn at 10ms intervals while being held down?
User avatar
Marko
Posts: 1725
Joined: Mar 2nd, ’13, 21:02

Post by Marko » Mar 2nd, ’24, 12:16

Create two shortcuts (Type: Command):

XButton1 (enable "Hook" option)

Code: Select all

While GetKeyState("XButton1", "P")
{
    Send {PgDn}
    Sleep 20
}
return
XButton2 (enable "Hook" option)

Code: Select all

While GetKeyState("XButton2", "P")
{
    Send {PgUp}
    Sleep 20
}
return
Post Reply