Trying it myself seems to work just fine. I thought it might crash, as I've also tried rebinding the arrow keys before only to have it do so, so maybe it's specifically trying to rebind the arrow keys and not camera controls?
Either way, to rebind the camera, first you need to locate the following file.
You can find it in your game's directory, which you can locate through Steam or through the game's shortcut used to launch it.
Then you need to extract the contents of the .x file. To do so, you'll need either to use the cmd prompt and use the packer utility, or you can simply use this GUI created by
@DavidTheTech which does it for you.
viewtopic.php?t=2827
With the contents extracted, locate the following file inside the extracted
ingame folder.
The contents of this file contain each keybinding the game has by default. On lines 18 - 22 you'll find the camera controls.
Code: Select all
// Camera movement
BindHold("rightarrow", "camera.bind.right");
BindHold("leftarrow", "camera.bind.left");
BindHold("uparrow", "camera.bind.forward");
BindHold("downarrow", "camera.bind.back");
BindHold assigns a function to a key as hold as it is held. You simply have to change the the parameter in the first set of quotations to your desired key. So for example, to rebind to WASD you can change them to this.
Code: Select all
// Camera movement
BindHold("d", "camera.bind.right");
BindHold("a", "camera.bind.left");
BindHold("w", "camera.bind.forward");
BindHold("s", "camera.bind.back");
Just be sure you don't create conflicting keybinds with anything else. For example, the 's' key is already bound to the "stop order" command further down in the file.
Code: Select all
// Client discrete events
Bind("s", "client.event de::stop");
Bind(",", "client.event de::prevdir");
Bind(".", "client.event de::nextdir");
Bind("shift d", "client.event de::selfdestruct");
Bind("u", "client.event de::upgrade");
Bind("[", "client.event de::prevunit");
Bind("]", "client.event de::nextunit");
Bind("alt [", "client.event de::prevunittype");
Bind("alt ]", "client.event de::nextunittype");
Bind("h", "client.event de::nextunit filter::headquarters");
Bind("e", "client.event de::selectall");
Bind("p", "client.event de::generic::togglepause");
Bind("space", "client.event de::messagejump::last");
Bind("g", "client.event de::selectgroup");
Since this is defined later in the file, this command will overwrite the previous bind for moving the camera.
Key Modifiers can also be applied, like such.
Code: Select all
// Hold the control key
Bind("ctrl 1", "iface.sendnotifyevent Client::SquadManager.Squad1 SquadControl::Create");
// Or the alt key
Bind("alt 1", "iface.sendnotifyevent Client::SquadManager.Squad1 SquadControl::Add");
// Or the shift key
Bind("shift 1", "iface.sendnotifyevent Client::SquadManager.Squad1 SquadControl::JumpTo");
// Combinations also work
Bind("ctrl alt w", "vid.toggle.wireframe;vid.toggle.texture");
Here is a file already created. It rebinds the camera movement to W A S D while leaving the arrow keys unbound. It also disabled the stop command, so you can use it as is or rebind it to something else. To install it, simply place the file into the
ingame folder. Repacking the .x archive is not necessary, as the game will see the freestanding .cfg file in the folder and use that over the one that exists in the archive.