Can I undo Ctrl W?
Ctrl+W → Close the active window / document. Ctrl+Z → Undo an action. Ctrl+Y → Redo the last action or repeat an action.
How do I turn off Ctrl W Close windows?
In the Customize Keyboard dialog box (File > Options > Customize Ribbon > Customize), locate DocClose in the "All Commands" category. Select the keyboard shortcut that you want to remove, and click the Remove button.