Invert Event Key (Press and Release) with a remaped key

Get help with using AutoHotkey and its commands and hotkeys
User avatar
cataflexia
Posts: 28
Joined: 26 Nov 2016, 17:02

Invert Event Key (Press and Release) with a remaped key

12 Aug 2018, 16:14

Hello everyone,

I play the games using the RWin key (SC15C) to map in many titles. However, like all we know, when you press de Win Key the game minimze showing tthe Star Menu.

For solving this I use AHK replacing the RWin key witth the Q key with this:



So now I need something very simple.

In games like Unreal, Unreal Tournament, Rise of The Triad 2013, don't have an alternate option for Always Walk - Always Run (on/off)

So, I want to make a script that invert the Keystroke, Press - Release. In simple words:

ROTT 2013 works in this way: Press a key to Walk, Release a key to Run
That I want with AHK: Press a key to Run / Release a key to Walk (like Quake 3)

The code for this is the following:

Code: [Select all] [Download] GeSHi © Codebox Plus

q::
Send {Blind}{q up}
return

q up::
Send {Blind}{q down}
return


All fine until here, when I press the REAL q the script works flawlessly.

But when I press the changed remaped RWin Key, the Invert Event Key don't work.

I've intented this:

Code: [Select all] [Download] GeSHi © Codebox Plus

RWin::
Send {Blind}{RWin up}
return

RWin up::
Send {Blind}{RWin down}
return


But n this case the RWin key don't work as a remaped Q key and now work like a Real RWin key, provoking the games minimizes likes I supposed.

Any aid plis? :(

All my code is this:

Code: [Select all] [Download] GeSHi © Codebox Plus

q::
Send {Blind}{q up}
return

q up::
Send {Blind}{q down}
return

RWin::q
Rohwedder
Posts: 1165
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Invert Event Key (Press and Release) with a remaped key

Yesterday, 02:35

Hallo,
try this inverted remapping:

Code: [Select all] [Download] GeSHi © Codebox Plus

*RWin::
SetKeyDelay -1
Send {Blind}{q Up}
Return
*RWin Up::
SetKeyDelay -1
Send {Blind}{q DownR}
Return

Return to “Ask For Help”

Who is online

Users browsing this forum: colt, Exaskryz, Google [Bot], jamie1992, Sabestian Caine and 44 guests