How to Close Task Manager by pressing ESC in Windows 11

In Windows 11 21H2 and all versions of Windows 10, you can close the Task Manager window by pressing the {Esc} key. This is no longer possible in the revamped Task Manager in Windows 11 22H2 and higher.

However, here’s an AutoHotKey solution that should help.

Workaround

  1. Download AutoHotKey 2.0 and install it.
  2. Copy the following lines to Notepad.
    #HotIf WinActive("ahk_exe Taskmgr.exe")
    Esc::
    {
    Send("!{F4}")
    return
    }
  3. Save the file as “tmclose.ahk”. Ensure you save it to a permanent folder.
  4. Right-click “tmclose.ahk” and choose “Run as administrator”. The script will run in the background.
  5. Now, open Task Manager and press Esc to see if it closes correctly.

Note:



To automatically run the above AHK script file elevated at logon, use Task Scheduler and configure it to run under your user account and with the highest privileges.


One small request: If you liked this post, please share this?

One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:
  • Pin it!
  • Share it to your favorite blog + Facebook, Reddit
  • Tweet it!
So thank you so much for your support. It won't take more than 10 seconds of your time. The share buttons are right below. :)

Ramesh Srinivasan is passionate about Microsoft technologies and he has been a consecutive ten-time recipient of the Microsoft Most Valuable Professional award in the Windows Shell/Desktop Experience category, from 2003 to 2012. He loves to troubleshoot and write about Windows. Ramesh founded Winhelponline.com in 2005.

Leave a Comment