Tool [AutoHotkey v2 script] Keyboard camera control (for mouse-based games)

frigate2601

New Member
Jul 4, 2018
2
3
A lot of nice first or third person games will use your mouse for camera controls, aiming and etc. I've been using AutoHotkey v2 to rebind keys to support one-handed gameplay (not having three arms feels bad man). I figured I could try to create bindings to control camera for these games, along with few other QoL features.

The attached AHKv2 script (change .txt to .ahk after downloading) allows following features:
  • Alt+W|A|S|D keys: allows controlling mouse-based in-game camera (configurable bindings and speed)
    • Tank controls are so back, baby!
  • F7 (toggle): put small green dot on center of your screen (configurable binding, color, size)
    • Now you can more easily grab those tiny table items in those first-person porn walking sims which have no built-in dot
  • F6 (toggle): suspend/pause the entire script (configurable, double-beeps when suspending, single long beep when resuming)
  • Possible to play with one hand (e.g. bind attack/ability buttons near camera controls)
    • For example: bind F, Z, ... to execute LButton/RButton/MButton (left, right, middle mouse clicks) in case game uses those
    • Once again, these camera controls make you play like a tank
Feel free to suggest a better idea how to translate KB buttons to mouse camera controls. I'd appreciate it.

Credits:
  • ChatGPT
    • Cause reading AHK docs, its user posts and then piecing together which is for v1 and which is for v2 is painful
    • ChatGPT surprisingly gave a good runway in the first few queries, more importantly found all the relevant functions to use and fixed some issues