Why does Ctrl + F4 not close a document that has been opened in Notepad++? Is there a way to enable it?

I have started using Notepad++ today and I expected Ctrl + F4 to close the current document as in most other applications on the Microsoft Windows platform (both non-Microsoft and Microsoft applications) with MDI (multiple document interface) or TDI (Tabbed document interface) interfaces: UltraEdit, Opera, Eudora, Firefox, OpenOffice, Visual Studio, etc.

Is there a reason for this?

Platform: Notepad++ v5.4.5, Windows XP 64 bit SP2, 8 GB RAM.

(Note: it is not enabled by default, but actually it can be enabled by changing the keyboard shortcut from Ctrl + W to Ctrl + F4: menu Settings -> Shortcut Mapper -> line 8, Close -> <right click> on Ctrl+W -> Modify -> Ctrl, F4 -> OK -> Close.)


I don't actually know why it is set to be Ctrl + W but to answer your other question: To change the default tab closing behaviour, go to Settings > Shortcut Mapper. Change the Close shortcut [8] to Ctrl + F4

  • 7
    Ctrl + W is widely used within FLOSS applications. Gnome f.e. uses that shortcut to close windows, and I bet so does KDE...oh, and Firefox btw too. – Bobby Aug 3 '10 at 6:51
  • 3
    @Bobby: It isn't just FLOSS apps. Ctrl+W is a standard CUA shortcut for Close, introduced by MacOS and adopted by Windows in the 1980s. – paradroid Sep 17 '11 at 11:21
  • 3
    Ctrl+W works with almost all tabbed or multi-document applications like Excel, Word, Eclipse... – phuclv Feb 23 '16 at 6:42

By default, Ctrl + W will close the current window. Notepad++ is not a Microsoft product, so it shouldn't be too surprising that it doesn't follow Windows 'conventions". If you go to Settings -> Shortcut Mapper you can change the Close function to map to whatever key combination you would like.

  • 3
    @Ciaran: Actually I'm used to ctrl-w, I mean, seriously, what microsoft app has tabs?! IE only got them after firefox, and in firefox it was ctrl-w, so I got used to that. – hasen Aug 1 '09 at 22:12
  • 5
    @hasen: It's not about tabs. Every windows MDI application should implement ctrl-f4 to close a document en alt-f4 to close the application. – fretje Aug 1 '09 at 23:22
  • 17
    Both Microsoft and Apple have had user interface guidelines for more than 20 years. For instance expressed in the books "The Windows Interface. An Application Design Guide" (1987, ISBN 1-55615-439-9) and "Human Interface Guidelines: The Apple Desktop Interface" (1987, ISBN 0-201-17753-6). From the former, page 16, table 2.6, "Recommended PC Function Key Assignments", Ctrl+F4: "Close document window". – Peter Mortensen Aug 2 '09 at 0:40
  • 4
    It's about time MS changed thier guidelines then. Ctrl+F4 is an easy way to get wrist-ache. – DisgruntledGoat Aug 24 '09 at 15:40
  • 2
    Alt+F4 and Ctrl+F4 is a legacy carried over from the MS-DOS days, when all the popular apps had different keyboard shortcuts, while Ctrl+W is a standard introduced in MacOS and copied by Microsoft, along with Ctrl+C, Ctrl+X, V, O, N, etc.; – paradroid Sep 17 '11 at 11:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.