How to fix the keybinding issue with assigning the "Q" key to any action

Oct 30, 2015
11
3
3
#1
So I previously made a suggestion regarding the key mapping system on the Discord, with some research on my side I have been able to pinpoint where the problem with assigning "Q" to an action would fail (obviously that happens even if the "Q" key is not bound to any other actions in your key map otherwise it wouldn't be an issue).
Here is the error you'll get if you try to do it:

binding_error_h2pc.png

I originally ran into this problem years ago when I tried to play the game with my KB+M on my AZERTY keyboard, on AZERTY keyboards direction keys are actually ZQSD and not WASD, if you try to bind the keys that way (even after carefully looking at every binding in the menu to see if there's not already an action mapped on that key), the game just throws you with that error you can see above.

After a few hours of investigation, it seems that the key bindings for each game profiles are stored in "%LOCALAPPDATA%\Microsoft\Halo 2\Saved Games", After looking into the file I realized that there is a "phantom" binding into this file that maps the Q key to an unknown action that can't be seen in the game's key mapping menu (I have no idea what that action is, probably a leftover of dev builds or something, it doesn't seem to be anything relevant anyway).

Here I'll explain to you how you can manually patch it.

So, in %LOCALAPPDATA%\Microsoft\Halo 2\Saved Games you will see as many folders as you have game profiles registered into the game, here's an example with my own "Saved Games" folder:

Code:
PS C:\Users\Idaho\AppData\Local\Microsoft\Halo 2\Saved Games> ls


    Directory: C:\Users\Idaho\AppData\Local\Microsoft\Halo 2\Saved Games


Mode                 LastWriteTime         Length Name

----                 -------------         ------ ----

d----          25/07/2024    19:03                S0000000

d----          25/07/2024    18:42                S0000001
You can see there are two folders, Because I have 2 profiles.

If you go inside one of these folders you'll see the following files:

Code:
PS C:\Users\Idaho\AppData\Local\Microsoft\Halo 2\Saved Games\S0000000> ls


    Directory: C:\Users\Idaho\AppData\Local\Microsoft\Halo 2\Saved Games\S0000000


Mode                 LastWriteTime         Length Name

----                 -------------         ------ ----

-a---          25/07/2024    18:42           4616 profile

-a---          25/07/2024    18:42            256 savemeta.bin
The key bindings are stored in the "profile" file, you will know which profile file belongs to which user because you'll see the name of that profile at the top of file.

With the help of an Hex Editor open it and go at the "D4C" offset (It might not be exactly this offset, this depends of the place your profile name takes at the top of the file actually), it should point you to a letter "Q", just change it with a "." and save the file:

hexeditor.png


You can now launch the game and you will find that you can now bind keys without any weird errors.

Here is how my binding looks now once I've been able to edit that crap out (a perfectly fine binding suited for AZERTY keyboards):

finalresult.png

Seems like playing with KB+M is something you gotta deserve with that game :p

If some developper can implement this into the game's code, you'll make the life of many KB+M users much more easier and help people map their keys as they please and not as the game forces you into because of its messy code, before that people had to resort to changing their keyboard layout to QWERTY or just use a gamepad to avoid the mess that the key binding system was putting onto them.
 
Last edited: