Jump to content

FPS Controls - Mouse Auto Recenter on WASD Keys (AutoHotkey Script)


Recommended Posts

Hello, All. This is an AutoHotkey script to recenter the mouse pointer whenever the WASD keys are pressed. It'll then wait for all WASD to be released before it can be retriggered again so it still allows some of the original behavior depending on your taste. I have mine set to retrigger after 50ms so pretty fast. You can bring this up to 500ms or 1000ms for a longer grace period by editing the script yourself.

This is only for those who use FPS camera/controls that you can select in the main menu options.
 



You can download and install AutoHotkey here (pick current version): https://www.autohotkey.com/
Install it, then download any of the "AHK" scripts I attached to this post.
Try the original 50ms grace period one before the 1000ms one to get a feel for what this does.
Double click on the AHK file to run them after installing AutoHotkey. A Green "H" icon will show on your windows taskbar indicating the script is running. It won't do anything unless Combat Mission is the actively focused window/fullscreen.
Change your Camera in the "Controls" menu in Main Menu Options to "FPS" mode.

The script should automatically detect all Combat Mission games automatically as it searches for "CM" in an active window title. (I've only tested Black Sea though)
You MUST disable any "run as administrator" for any game shortcuts/exe as the script won't be able to detect the Combat Mission window.

I found FPS Controls the most fluid/freeing for the game but was perplexed how pressing WASD would jump the camera when I usually/accidentally had my mouse pointer in the wrong place. It's honestly frustrating. So this should alleviate that problem and should make it more logical and accessible for people to use.

FPS Controls are now my preferred way to play. It's really hard to go back to Standard/RTS controls once you realize the freedom of movement you have. 

It's not perfect as it's not native to the game code so there might be small jerks here and there but it works well enough.

There's also bonus Hotkeys that I've included that you can edit yourself in case you want something different.
Shift + Z = Removes Waypoints (Backspace)
CTRL + Z = Clears Target (Delete)

Big thanks to Rohwedder from the AutoHotkey forum who worked out the logic of the code.
You guys are free to edit the scripts as you please but please credit Rohwedder if you plan on using his WASD code.

Google Drive Mirror: 
50ms - https://drive.google.com/file/d/1QII1cTZOy31NXEN87AyVXM7j8whPKoe8/view?usp=share_link
1000ms - https://drive.google.com/file/d/1i78x_tE3n1OFQqRe6ZT2JYrl8WR8DiGU/view?usp=share_link

Enjoy!

Combat Mission - FPS Mouse Recentering.ahk Combat Mission - FPS Mouse Recentering 1000ms.ahk

Edited by JohnCamara
Google drive mirror
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...