First of all, let me point out that I'm certainly familiar with the age-old Alt+F4 shortcut, so that's not exactly what I want.
Probably half the programs I use on a regular basis have the Ctrl+W shortcut that closes the current tab (in browser), spreadsheet (in Excel), or text file (in Notepad++) - just a few examples. I've grown so accustomed to using Ctrl+W that it really irks me when a program does not utilize the same hotkeys.
I've never used AutoHotkey before, but I've seen plenty of articles on its usefulness. Is this task something within the scope of an AutoHotkey script? I would want the shortcut to close the current tab or sub-window, but then close the current program after the final tab is closed.
In Chrome, this is default behavior, but I haven't seen the same in too many other applications. I love the functionality, though, and would like to port it to all Windows apps.