Close current window shortcut [duplicate]

Is there a shortcut to close the current window?

  1. W closes the current tab

  2. W closes all windows

  3. Q quits the app completely

However, I’m looking for an intermediate between 1 and 2, to close the current window as if I’m pressing the red x.


To close the current window with several tabs use:

⇧/shiftW

This works fine at least in Finder, Safari, Firefox and Google Chrome.