How to Customize Mafia 2 Controls Using AutoHotKey

No Image

Let’s consider an age old situation, that you are an old hardcore FPS fan from the days of Wolfenstein and Doom, using ASD and RMB for movement.
You still use the same configuration and are pretty disappointed with Mafia 2, not offering any option to map keys of your choice.
What can be done to have you playing with your native FPS controls ? AutoHotKey has the answer.

You can pretty much map any key for the game using application by following the guide below.

Step 1
Create a text file and name it ‘Mafia 2.ahk’.

Step 2

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
#InstallMouseHook
#InstallKeybdHook

#IfWinActive ahk_class Mafia II
RButton::Up

Paste the above code in this text file and save the file.

Step 3
Install AutoHotKey application and double click this script file you just created.

RMB has been mapped to forward in Mafia II.

You can read the AutoHotKey Quick Start Tutorial to work out all the possibilities.

By Zawad Iftikhar

Zawad is the lead editor here and it's him who manages what gets published on the site. When not working on SegmentNext, he likes to relax with a few PC games.

Latest Posts

Around The Network
    • me

      thank you!!! i will try this. I was going crazy wondering why i cant map that key to forward!! glad i am not the only one

    • Silicon Vampire

      Can anybody help me? I am not stupid but I can not make this work.

      I can even remove the conditional

      #IfWinActive ahk_class Mafia II

      and it works fine out of game. In game, not at all.

    • Pingback: Mafia II Errors, Crashes, ATI Fix,PhysX Fix, and Graphics Bugs | SegmentNext