How to write an ahk scipt for holding down 'end' key

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
aukikco
Posts: 4
Joined: 26 Oct 2017, 05:23

How to write an ahk scipt for holding down 'end' key

18 Sep 2021, 12:08

Preferably, I'd have the script start holding down the end key when I press the key and release the hold when I press it again. If this is not easy to do, having a modifier like ctrl+shift+end would work too.

I googled around for this but for some reason was not able to wrap my head around the instructions I found. How do I do it?
Ianizer
Posts: 79
Joined: 07 Mar 2021, 00:06

Re: How to write an ahk scipt for holding down 'end' key

18 Sep 2021, 17:46

Try this:

Code: Select all

$End Up::Send, % (HoldEnd := !HoldEnd) ? ("{End Down}") : ("{End Up}") ;the ()?():() stuff means: "Assign the variable HoldEnd to not HoldEnd. (So if HoldEnd = 0 or "", HoldEnd now = 1, and vice versa.) If HoldEnd now = 1, then Send {End Down}, else {End Up}"

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Anput, Marium0505, Nerafius and 193 guests