In windows, alt+F4 does not close cmd (As in: WindowsKey+R, cmd, Enter)
How different is the command window from a normal window?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
On the other hand, if you are looking to have Alt+F4 close the console window, you can use the following AutoHotkey script:
#IfWinActive, ahk_class ConsoleWindowClass !F4::WinClose, A #IfWinActive
Alt+F4 sends the program with focus the
cmd program is either intentionally configured to ignore
WM_CLOSE messages, or possibly doesn't process any messages at all.
Windows 10 Command Prompt Can Be Closed using ALT+F4 Hotkey claims that this problem affects only Windows up to 8.1.
Windows 10 Command Prompt duly responds to ALT+F4
It also mentions that Alt + F4 can be disabled in Windows 10 to mimick the old behaviour by creating a registry key
AllowAltF4Close set to