zufuliu / notepad4

Notepad4 (Notepad2⨯2, Notepad2++) is a light-weight Scintilla based text editor for Windows with syntax highlighting, code folding, auto-completion and API list for many programming languages and documents, bundled with file browser plugin matepath.
Other
2.6k stars 184 forks source link

Add menu 'Dbclick Esc Exit Notepad4' for esc exit #835

Closed Jackarain closed 3 weeks ago

Jackarain commented 1 month ago

添加一个双击 ESC 退出的选项,当使用 ESC键 作为快捷退出时,在使用过程中偶尔会误操作(比如在按 ESC 取消一些弹出菜单或对话框时不小心容易就成了退出)按到 ESC 导致文档关闭的问题。

使用双击 ESC 作为退出选项,则可避免这个问题,双击 ESC 的使用方式同时也仍然具有快捷性。

zufuliu commented 1 month ago

100ms or 200ms looks enough to press the key twice.

Jackarain commented 1 month ago

确实有可能,如果能接受双击 esc 作为退出的选项,至于双击时间间隙你可以在合并时修改为一个你认为比较合适的值

zufuliu commented 3 weeks ago

I'm sorry, but I decided to not merge this. functionalities similar to "Press Esc twice to exit Notepad4" already exits, so I think it's better for you to not enable extra Esc key function.

  1. Standard Alt + F4, which is File -> Exit menu.
  2. Shift + Esc, which is CMD_SHIFTESC

https://github.com/zufuliu/notepad4/blob/de8b12ad955ea657599343f1685289e2b340694a/src/Notepad4.cpp#L4498-L4507