Deus Ex: The Fall

Deus Ex: The Fall

Not enough ratings
Keyboard (and Mouse and Gamepad) Remapping Guide
By Y|yukichigai
How to reconfigure the keyboard (and mouse and gamepad) commands to your liking, using the free program AutoHotkey.
   
Award
Favorite
Favorited
Unfavorite
Introduction

Deus Ex: The Fall suffers from a somewhat critical game flaw: the control keys cannot be remapped, rebound, or any other way of saying "changed". While the controls do (mercifully) follow basic game standards like WASD, many people may find certain bindings oddly placed or inconvenient. These bindings may also be a serious problem for people using non-US keyboard layouts, to the point where they literally cannot play the game.

Fortunately, there is a solution: a free, open-source, no-advertisement program called AutoHotkey. Though it's a little tricky to set up, AutoHotkey allows you to remap keys, and not only that can also remap mouse clicks and even gamepad buttons. It also can be configured to use different remappings only when specific programs are running and active, meaning you can limit its effects to just one program.

This guide will show you how to obtain, install, and configure AutoHotkey for use with Deus Ex: The Fall, and thus allow you to remap the game's key bindings. This guide will only cover rebinding the keyboard, though it will link to a reference page which will have further information on how to remap other actions like mouse clicks and gamepad button presses.

Though it should be obvious, this will not change the key listings within the game. In-game tutorials will still act as though they keybindings are unchanged, because as far as the game is concerned they are. You will need to keep track of what keys have been remapped in order to properly understand in-game tutorials.
Obtaining and Installing AutoHotkey
Obtaining and installing AutoHotkey is straightforward, but all the same I'll cover it here. AutoHotkey can be downloaded from http://www.autohotkey.com/. Simply click the giant huge un-miss-able "Download AutoHotkey" button near the top of the screen and your download should start in a moment.

Don't let the ace site design fool you: AutoHotkey is not a paid program. It's completely free, open source, and has no advertisements, toolbars, or other such drek.

Installation is also very basic: run the program, click "Next" a few times, and that's it. There are no hidden options you need to worry about (at least at the time of writing) or any malware you want to avoid installing. A few clicks and you should be done and ready to start configuring.
Configuring AutoHotkey
Installation was easy. Now comes the hard part: setting it up. AutoHotkey lacks any sort of GUI or easy visual way to set reconfigured keys. Instead, you have to use a text editor to make your own configuration file. Fortunately, the format it uses is pretty easy. First though, we need to run AutoHotkey for the first time.

AutoHotkey does not run immediately after install, nor does it place any shortcuts on your desktop. To run it you'll need to find it in your Start Menu or Start Screen. By default it is placed in a folder named "AutoHotkey" inside the Programs folder, or you can use the Windows search bar to find it. However you roll.

On first run, the program will ask you if you want to create a sample script in your My Documents folder. Say "Yes". This will create a file named "AutoHotkey.ahk" in your My Documents folder and open it in Notepad. This file is run automatically whenever AutoHotkey is started. Obviously, this is the file we want to edit.



Once open, you'll see some explanation text, along with a few existing hotkeys which have been made by the program. You may want to delete these since they are (for the most part) useless, or you may want to keep them so you can refer to them as examples. In any case, you will want to place the following text on the blank lines at the bottom of the document:

#IfWinActive Deus Ex: The Fall ahk_class UnityWndClass Return

What this code does is tell AutoHotkey to process any commands, remaps, and hotkeys between the top line and the "Return" only when Deus Ex: The Fall is the active window. This means you can specify key remaps but have them only apply in the game, allowing you to switch windows with the game still running without having to remember what keys you've changed.

With that text added, it's time to add your desired remaps! There are pages of tutorials on the AutoHotkey website, but here you'll be most interested in the remapping guide[www.autohotkey.com] and the key code list[www.autohotkey.com]. In addition, I suggest you open up a copy of the keyboard binding image (such as this one) to help you figure out what keys you want to remap. The format for remaps is pretty simple:
<key you press>::<what the game sees> --Examples-- LShift::c c::f f::g g::LCtrl LCtrl::LShift

An important note is that remapping a key does not interfere with other key remaps. That is to say, the above code does not result in an infinite loop where pressing LShift triggers a remap to c, which triggers a remap to f, etc. etc. etc.

Once you have set up your key remaps you should wind up with something that looks like the following.




If everything looks right, run the AutoHotkey program again, since on first run it opens the configuration file instead of running the program itself.
Testing and Troubleshooting
With the configuration file set up, now it's time to test! The most obvious way (and really the only way) is, duh, run Deus Ex: The Fall. I recommend running the program in windowed mode so you can easily switch back and forth between tasks as need be.

Are things not working right still? Here's a few potential causes of your problems:

1) Make sure AutoHotkey is running. AutoHotkey doesn't auto-start with Windows, and doesn't even technically start the first time you run it if you have it generate a sample configuration file. To see if its running, go to your taskbar and find the green H icon. If you don't see it, it's not running.

2) Make sure the configuration is loaded. Changing the contents of the configuration file won't automatically change what commands AutoHotkey is using. If you've made changes recently, right-click the H icon and select "Reload This Script".

3) Make sure the configuration is loading correctly. Another problem you might be having is that there's something in your configuration that AutoHotkey doesn't like, say a bad command or something. Try removing options one at a time and see if things suddenly start working again. For a detailed explanation of the way the configuration files work, check the AutoHotkey online documentation[www.autohotkey.com]. You can also use the "Open" option to get a status window. If it is working correctly you should at least see a line mentioning "Return". An example is at the bottom of the page.

4) Make sure VSync is turned on. For an unknown reason, Deus Ex: The Fall performs very poorly if VSync is not turned on. Missed button presses, keyboard sluggishness, menu errors, and a few other bugs have all been linked to the VSync setting being disabled. If AutoHotkey doesn't seem to be working consistently, make sure the VSync setting has been set to "On". As the game is relatively primitive by modern graphics standards, there is almost no reason to run the game with VSync disabled. Even a low-end modern video card should be able to manage upwards of 60fps at maximum settings.

5) Ensure the name of the Deus Ex: The Fall window hasn't changed.. The configuration line I have included to limit the remaps to only Deus Ex: The Fall currently works, but a future update might change either the name of the window or the window class. Fortunately, AutoHotkey comes with a tool to detect this, called AutoIt3 Window Spy. Run this program, then switch to Deus Ex: The Fall; the program will show the name and class of the window, which is used in the "#IfWinActive" line. If the example on the right were the game window (which it isn't), I would change the top line of my configuration file to the following:
#IfWinActive Steam ahk_class USurface_27963924

5 Comments
HerrKaputt Jul 9, 2016 @ 6:36am 
Is there a zoom option in the PC version?
wb98 Aug 23, 2014 @ 2:28pm 
I haven't tried it out yet, but I will if I need to
JellyY0 Aug 11, 2014 @ 2:32pm 
+1 While I'm ok with the defaults- I support anyone who makes PC gaming, well more PC Gaming-y
sylvan1 Jul 12, 2014 @ 11:47pm 
Thanks for the guide!

I use AHK at work, and didn't even think to use it for games that don't allow remapping of keys like this. Genius! :Cyberboost:
AEon Jun 24, 2014 @ 10:39am 
Good info, been using it after some (probably other) user suggested the tool, e.g for Need for Speed World. Nice reminder, and some really nifty extra info.