How can I bind something in autoexec.cfg so that it doesn't get rebound by default bindings or whatever is set up in settings?

I want to rebind mouse1, shift, ctrl and some other keys so that they also clear decals in csgo. I did that in autoexec.cfg:
bind r "+reload; r_cleardecals"
bind shift "+speed; r_cleardecals"
bind ctrl "+duck; r_cleardecals"
bind mouse1 "+attack; r_cleardecals"
However these bindings are being overwritten by simple bindings which are set up in csgo settings. Is there a way to prevent them from being reset? Ideally I want to be able to bring autoexec.cfg to a new computer with csgo and have everything configured there just working.
Best Answer
What you can do is to run CS:GO, open console, then unbind said keys before you rebind them. To open console, you must enable it trough the options menu, under key bindings and advanced settings. You can also right-click CS:GO in your steam game library and select "launch options". There you must write -console. Done correctly and the console will be open when you start the game again. I recommend you do a bindtoggle [ keyname ] console to ensure you get easy access to the console at a later point.
In console, write:
unbind [ Keyname ]
Then you can rebind them using bind [ keyname ] [ command ]
The unbind part may not be needed, but it's reasonable to do so you are sure the keys are completely set to ONLY be bound the way you want.
Pictures about "How can I bind something in autoexec.cfg so that it doesn't get rebound by default bindings or whatever is set up in settings?"



How do I bind an autoexec?
All you need is:How do I autoexec a cfg?
TL:DR Creating the autoexec fileHow do I autoexec auto exec?
How to Run Autoexec in CSGOHow do you Unexec a cfg in csgo?
cfg . Open Windows Explorer and go to C:\\Program Files (x86)\\Steam\\steamapps\\common\\Counter-Strike Global Offensive\\csgo\\cfg or if you changed steam directory go to [Steam directory]\\steamapps\\common\\Counter-Strike Global Offensive\\csgo\\cfg then move endchscript.How To Fix autoexec.cfg Jump Throw Bind in CS:GO! 100% Working!
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Andrea Piacquadio, Helga, Karolina Grabowska, Felicity Tai