Doesn't work.
I tested this on Krita 3.1.2 (Windows 8.1) and Ctrl+W closed the document as I think it would. maybe there are some mangled shortcuts somewhere. Mine are here... Desktop\krita-3.1.2.1-x64\share\krita\shortcuts I know there were some recent fixes to shortcut mappings, so you might need to have a fresh shortcut file to avoid conflicts in case it was messed up before
Many shortcut keys fail to work in "photoshop emulation" mode. In default mode it is fine.
This still happens in 4.1. For future reference, the workaround for this is... settings->configure Krita->shortcuts->new->enter name(this duplicates the selected shortcut) settings->manage resources->open resource folder. folder->shortcuts->name.shortcut, open in text editor. ctrl+f "file_close", replace ctrl+w with 'none'. Save, Restart Krita.
Git commit 36861ec3b2608893a5c624560e5d3302bda19c31 by Boudewijn Rempt. Committed on 18/09/2018 at 11:30. Pushed by rempt into branch 'master'. Remove the shortcuts from the mdi window's system menu's actions Just changing the scope isn't enough: people also want to be able to configure the the close window action. Fortunately, that turns out to be quite possible. Related: bug 352205, bug 398729 M +8 -8 libs/ui/KisMainWindow.cpp https://commits.kde.org/krita/36861ec3b2608893a5c624560e5d3302bda19c31
Git commit 7de91a765bb10fe4c55ef851bd157177618a8171 by Boudewijn Rempt. Committed on 24/09/2018 at 06:57. Pushed by rempt into branch 'krita/4.1'. Remove the shortcuts from the mdi window's system menu's actions Just changing the scope isn't enough: people also want to be able to configure the the close window action. Fortunately, that turns out to be quite possible. Related: bug 352205, bug 398729 M +8 -8 libs/ui/KisMainWindow.cpp https://commits.kde.org/krita/7de91a765bb10fe4c55ef851bd157177618a8171