The Mac keyboard shortcut command W will perform the Close Tab action. If you are using an application that supports tabs, the keyboard shortcut will close the current tab. If there is only one tab open or if the application in use does not support tabs, the keyboard shortcut may close the entire window. Close Tab is a global Mac keyboard shortcut that is usually located in the File menu. This keyboard shortcut for Close Tab is available in Mac OS X and may also be available with other versions of Mac OS.