Change Shortcut for closing windows
Solution 1:
- Download and install AutoHotkey
- Create an empty file called shortcuts.ahk
- Create a shortcut to that file and put it in the Startup folder
-
Edit shortcuts.ahk and put this in it:
^w::Send ^{F4}
Double click on shortcuts.ahk
Keep in mind that Ctrl+W is used for other things, e.g. in Notepad², it enables word wrap.
See also:
- Is there a way to create a custom hotkey in Windows that will close the current window or sub-window?
- Better Windows Shortcuts blog post
- all my AutoHotkey settings (for ideas, e.g. Ctrl + Q)
Solution 2:
I think that even an AutoHotkey beginner can do this. The script is as follows:
Alt & F4::
return
Ctrl & w::
WinClose, A
But what if you just wanted to close a Word document or a Firefox tab (when Ctrl+W is used as a hotkey), not the whole application?