Binding extra mouse buttons to commands
-
I have some extra mouse buttons i've never used and have realised they would be good for assigning patrols or attack moves. Does FAF support them, have looked in key bindings but can't seem to register them being pressed to assign them...?
-
You can use Autohotkey to remap mouse buttons to regular keys or even key combos while Supreme Commander is the foreground application. You can then bind those keys to issue commands ingame.
Below is a sample script that should do what you need, assuming your mouse has 2 extra "do something" buttons (some buttons can't be mapped, like those that change sensitivity).
#IfWinActive ahk_exe ForgedAlliance.exe XButton1:: SendInput {F5} XButton2:: SendInput {F6} MButton:: SendInput {F7}
Copy this into your favorite text editor and save the file with .ahk extension. After installing Autohotkey, double click this file to get it running, and maybe add a shortcut to this file to your startup folder in start menu. Once it's running, and supcom is the active window, your extra mouse buttons should behave like pressing F5 and F6 and your mouse wheel click, F7 (these can be changed). Just let me know if you need help getting this setup or if your buttons don't work.
-
Thanks phong that makes sense. I can't quite figure out how to find the correct names for the buttons on the side of the mouse, cannot find anything in windows for example that lets me test them. They do work as they seem set to page backward/forward on any internet browser though.
-
if you installed Autohotkey, there's a way to find out what the buttons are.
Once you have the script running, there should be a green H in your system tray. Double click it.
A text window pops up. In the menu, find " View > key history and script info "
the text window should change to a list of recently pressed keys. spam the mouse button a few times and hit f5
now near the bottom of the list, you can read the name of the button pressed under the Key column
this name should replace XButton1 in the script above. Edit it, save it, then right click the green H again and select "reload this script".