Company of Heroes 2

Company of Heroes 2

116 Bewertungen
How to Rebind Hotkeys in Company of Heroes 2
Von Endie
A brief guide to rebinding hot keys in CoH2 using AutoHotKey
3
2
   
Preis verleihen
Favorisieren
Favorisiert
Entfernen
Rebinding Hotkeys using AutoHotKey

Step 1 – Peripheral Software

If you simply want to rebind 1 or 2 hotkeys, such as the tactical map, then check if your mouse or keyboard comes with software that allows you to rebind it to any key you so desire. Personally, I use a G400S, which comes with software that allows me to do this. Here, I’ll rebind one of my buttons to Numpad 0, an extremely important hotkey in CoH2 that grants you use of the tactical map.
If your mouse or keyboard has no such software, then disregard this option.

Step 2 – Download AutoHotKey

Download the program, AutoHotKey and install it. Don’t worry, its completely safe. We’ll be using this program in just a bit. The download link is in the description below.

http://ahkscript.org/download/

Step 3 – Enable Grid Keys

Now while this step is optional, if you are a new player, I strongly, strongly recommend that you use grid-key assignments. Grid keys are more compact and easy to reach than some of the strange default hotkeys that Relic has assigned in Company of Heroes 2. Furthermore, this will provide a much needed consistency that will allow us to avoid any conflicts when we want to change our keybinds. You can find this option by going to Menu > Options > Gameplay, then scrolling down to Classical hotkeys and disabling it.

Step 4 – Creating your AutoHotKey Script

Make sure you’ve installed AutoHotKey. Once you’ve done so, open up a fresh notepad file and copy and paste any of the scripts below you so desire. Save the file as CoH2.ahk, it doesn’t matter what you call the file, as long as it ends in .ahk. Then, simply execute the file and now whenever your company of heroes 2 window is the active window, these key bindings will apply. Below, one of the scripts I’ve included simply rebinds the Numpad 0 key to the tilde key. This puts the Tactical Map Hotkey in a much more accessible position than it was before.

If you want to use a combination of arrow keys and grid style hotkeys, then I’ve also included my own personal script. It moves the arrow keys to the W A S D configuration. As a result I’ve had to shift the keys displaced from W A S D to other keys. You can change these keys if you wish.

The script should be fairly self-explanatory, the first letter is the key you want to change, and the 2nd is the command you want that key to execute instead. I’ve put the left bracket key as my stop key, if I ever want to disable the script whilst I am in game. This is handy if I ever want to talk in game or use steam chat. Alternatively, I’ve also provided a script below that does this when you hit the Enter key.

You can customise these scripts below as you like.

http://pastebin.com/dMc3SLpA – Tactical Map Rebind ONLY, AHK Script
http://pastebin.com/9f4MJ9ks – WASD Movement, Enter key Disable/Re-enable, AHK Script
http://pastebin.com/AUi9KSU1 - WASD Movement, [ key Disable/Re-enable, AHK Script

[UPDATE]

http://pastebin.com/wiYq5Eiw - My latest script, ASD keys no longer bound to GBN. CTRL + A activates A, CTRL + S activates S and CTRL + D actives D. Thanks to RifleReady for providing me with ctrl modifier commands.


[UPDATE - 29th Nov 2019]

https://pastebin.com/y5L9S41Y - Here is my current script that I use. Spacebar for tactical map. WASD camera movement. If you want to change specific binds simply change 2nd key,

e.g. Currently my space key is bound to Numpad0 when I open CoH2 through this line:

space::Numpad0

This brings up the tactical map. If I want to change this to a different key, say the ~ (tilde) key do this:

~::Numpad0

If you want to leave the tactical map binding as is, delete the line. Now repeat for every other binding written in the file (edit through notepad).
74 Kommentare
RAZORLIGHT 10. März um 5:14 
If anyone wanna rebind the pause button (ingame pause) to spacebar, to "clone" the tactical pause of Company of Heroes 3, use this:

#HotIf WinActive("Company Of Heroes 2", )

Space::vk13

Return
Grond 13. Okt. 2024 um 22:00 
#HotIf WinActive("Company Of Heroes 2", )


+w::up ;shift+w moves camera up
+a::left ;shift+a moves camera left
+s::down ;shift+s moves camera down
+d::right ;shift+d moves camera right

n::^. ;n selects all infantry
b::^ç ;b selects all vehicle
m::ş ;m selects all (infantry and vehicle)

Space::MButton ; camera movement (hold space + move mouse)
-::alt ; change camera angle (tip: push backspace for resetting it)
alt::ctrl ; alt takes all behaviours of ctrl (alt becomes ctrl)
ctrl::Numpad0 ; ctrl opens tactical map (ctrl becomes Numpad0)

Return

This is for Autohotkey version 2. Some keys mignt not work for you, it depends on your keyboard layout, so you need to change for yourself.
Grond 25. Sep. 2024 um 3:10 
My settings for autohotkey v2. (it's for version 2 (preferably latest stable version) ( https://autohotkey.com/download/ ), not gonna work for version 1) (Delete explanations)


#HotIf WinActive("Company Of Heroes 2", )


-::alt ; - button changes camera angles. tip ; push one time backspace button to fix
(reset) vertical angle, two times to reset entirely or you can change horizantal
angle tactical map view without broke the vertical angle

alt::ctrl ; alt button has the ctrl button functions now. For example, assigning control
groups with alt instead of ctrl and other functions

ctrl::Numpad0 ; ctrl button opens and closes map view


*::Suspend() ; * button stops script running.


Return
Isaac's Arcade 21. Apr. 2024 um 10:31 
The fact that this is a thing is making me uninstall the game
Eggie7283 21. Nov. 2023 um 8:21 
doesn't work...

any suggestions?
MainTerranGallian 24. Juni 2023 um 18:20 
Does anyone have the latest script here? it says that it isn't available
[PL] Flux 8. Aug. 2022 um 15:57 
Hello. I get WASD and Tac Map but what are the rest for and what have they replaced in your latest keybind?
Starker 10. Mai 2022 um 0:46 
You can edit the keybindings in keydefaults.lua in data.sga. Company of Heroes 2 Tools can extract SGA archives, but apparently cannot repack them.

Corsix Mod Studio can do this, but is only compatible with the first game.

How do we repack SGA archives for the second game?
Olavi 11. März 2022 um 22:16 
breh there is no classical hot key option in the options
Fuzzinutz 14. Sep. 2021 um 1:21 
Hi Endie,
Thanks for the effort in making this guide... Can you help me with a problem I have?

When I play COH2 the autohotkey script works only once, and then stops working. Strangely, when I return to windows the .ahk file that was saved to the desktop has self-deleted!
This has happened 3 times now...
(I'm just trying to remap Numpad0 to ~ key)

Thanks for your help!