Company of Heroes 2

Company of Heroes 2

48 ratings
Making Hotkeys Much Easier - AutoHotKey
By [TREIBJAGD] Ano
I deliver you my autohotkey script for coh2. It makes you play with hotkeys alot more easier.
   
Award
Favorite
Favorited
Unfavorite
AutoHotKey explaination & script!
Here is my autohotkey script for you! Feel free to edit it :)
If you have question, just ask.


How to use it?
Ingame change your settings to use "Classic Hotkeys".

Go to www.autohotkey.com and get your self the programm called authotkey. If you have done that you can paste the script into a text file. Call the end of the .ahk instead of .txt.

You can also use your context menue with right click to edit some script. To start or stop your script you can define some keys or use H symbol inside of your taskbar.




What does it do?

It gives you speed adventage because you dont have to use your whole keybord. You can fast scroll with keyboard keys, instead of using slow scrolling with mouse. So your mousepointer is always free for making orders!

  • F11 ---> Pause the Script
  • SHIFT + WASD ---> Using fast camera movement (same like arrow keys)
  • SHIFT + SPACE ---> Tactical Map
  • SHIFT + R ---> Refresh all units 5x, not just 1x
  • Left Win ---> Toggle next Idle unit
  • Middle Mouse Button ---> Attacking move
  • Mouse Button 3 ---> Tank drive backwards & click!
  • Scrolling ---> Select next squad in selection

It deactivates it self when you hit enter, for using your ingame chat. To use abilitys just dont hold Shift while pressing W, A, S or D Key. But you can choose your ability first and press shift afterwards!


The script!

Pastbin:

https://pastebin.com/p06qcy7N


AHK Script:

; f11 suspends script
; reenable long beep
; suspend short beep
f11::
Suspend
if ( A_IsSuspended )
{
SoundBeep
}
if ( !A_IsSuspended )
{
SoundBeep, 523,850
}
return
; Return enables normal chat
Return::
Suspend
if ( A_IsSuspended )
{
Send {Enter}
}
if ( !A_IsSuspended )
{
Send {Enter}
}
return
+Return::
Suspend
if ( A_IsSuspended )
{
Send +{Enter}
}
if ( !A_IsSuspended )
{
Send +{Enter}
}
return

+w::up
+a::left
+s::down
+d::right
+space::Numpad0
LWin::!.

+r::
SendInput {r 5}
return

MButton::
SendInput {a}
Send {click}
Return

XButton2::
SendInput {u}
Send {LButton}
Return

+XButton2::
SendInput {u}
Send {LButton}
Return

WheelDown::send ^{Tab}
WheelUp::send {Tab}


Just copy & paste everything above from here to "#NoEnv" and put it into some textfile. Call it XY.AHK.

Have fun & good luck! :)


8 Comments
Mylaur Dec 17, 2024 @ 1:20pm 
I added AZERTY version + F hotkey instead of Shift F has been a great time saver

Credits to you!

{LINK REMOVED}
oki Jul 18, 2022 @ 11:51pm 
very cool
fRiEndlY PhYrE Feb 13, 2022 @ 12:21pm 
using the shift + wasd on mine as well but why in hell would you use classic hotkeys if your goal is to optimize your experience?
kOOsmaty Jan 31, 2022 @ 2:40pm 
N1 :)
Dr. Uzel Dec 20, 2021 @ 3:46pm 
very thanks :) now is game so better
AnarchoCapitalist Uncle Jun 25, 2019 @ 10:17am 
no u
Dazooe Jun 24, 2019 @ 7:40am 
hey thanks I gonna try this out, I wouldn't have known other wise thanks!