In Notepad++, pressing Alt+X always closes current document, even if the keyboard shortcut is not assigned anywhere in the Shortcut Mapper. What is the source of this behavior and how can I stop it?
The source is the barely noticeable
X item on the right side of the main menu bar.
The easiest way to stop Alt+X activating that item is to assign this keyboard shortcut to another command in the Shortcut Mapper. For example, assign it to File > Rename... because it always displays a window (asking for new file name) before executing the command so unwanted activation can be canceled by Esc before it does anything.
Alternative solutions proposed by other people: https://sourceforge.net/p/notepad-plus/discussion/331754/thread/3b917b41/