I want to achieve the following:
I press and release the C key, and the letter C
is typed, as normal.
But instead, I want to press and release the C key, and have CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC..
typed continuously until I press C again.
How would the latter look in Delphi code as a key function?
Essentially, I have a hotkey assigned to a function, and it works, but I want to change it so that a single press of the hotkey causes the function to continue repeating until the hotkey is pressed again.
Here's the code:
lka_Skip:
if Game.Playing then
if func.Modifier < 0 then
begin
if GameParams.NoAutoReplayMode then Game.CancelReplayAfterSkip := true;
if CurrentIteration > (func.Modifier * -1) then
GotoSaveState(CurrentIteration + func.Modifier)
else
GotoSaveState(0);
end else if func.Modifier > 1 then
begin
fHyperSpeedTarget := CurrentIteration + func.Modifier;
end else
if fGameSpeed = gspPause then fForceUpdateOneFrame := true;
I can already add a "Hold" checkbox to the lka_Skip
function, but I need a line of code which says "if the hold box is checked, perform the action repeatedly until the key is pressed again".