alternate between key press

Ask gaming related questions
jlodvo
Posts: 24
Joined: 24 Sep 2023, 19:53

alternate between key press

12 Jan 2024, 00:17

hello need help on how to make a button F10 = switch between Page up and Page Down
first press it will press page up and next press it will press page down (alternating each time i press the F10 button)
niCode
Posts: 318
Joined: 17 Oct 2022, 22:09

Re: alternate between key press

12 Jan 2024, 01:03

Because you posted this in the gaming forums, you may need to change Send to SendEvent for more reliability in games.

Code: Select all

F10:: {
    static toggle := false
    Send('{' ((toggle := !toggle) ? 'PgUp' : 'PgDn') '}')
}

Return to “Gaming”

Who is online

Users browsing this forum: No registered users and 3 guests