For the 5 people around here who are still into Autohotkey, this is a revisit of the idea for quickly exiting a cmd window.

#IfWinactive ahk_class ConsoleWindowClass
^w::
send !{space}C
return
#IfWinActive,

In order to have more consistency between cmd and other window types, like folders, this ahk script uses the CTRL key and the letter โ€œwโ€ to close out the cmd window. Of course, you can use another key combo.

ETA that Autohotkey and Windows 10 seem to get along pretty well.