The macro opens the « Run « window and writes cmd.exe, then in the command line writes taskkill /f /im csgo.exe and the game closes. IMPORTANT! You should have an English keyboard layout and set the delay in accordance with how you open the « Run « window and the command line.
Download the program (Download) and go to the macro editor
press the button «Open file»
and select the downloaded file
assign a macro to a key and run the program