Set 2 buttons to same action

I wanted to use two buttons for the same action (Stop - S and Mouse 4), but I cannot find any setting to do so.

Can someone point me on how to do so?


Solution 1:

config.cfg is automatically generated, so it will lose any edits you make to it.

To set up custom actions for buttons you need to edit this file (you may need to create it first):
steamapps/dota 2[ beta]/dota/cfg/autoexec.cfg

To bind both S and MOUSE4 to Stop, write the following lines to autoexec.

bind S "dota_stop"
bind MOUSE4 "dota_stop"

Note that the in-game keyboard settings override the settings in autoexec, so you may need to clear the action there. Also, those custom settings are not synchronized to Steam Cloud.


In case someone needs to do the opposite – make a button execute many actions at the same time: just separate them with semicolons.

For example, you can make a button to toggle autocast no matter which skill slot it is in:

bind T "dota_ability_autocast 0; dota_ability_autocast 1; dota_ability_autocast 2; dota_ability_autocast 3"