Describe the bug
When press F11 to toggle fullscreen, the “close” option in the right-click menu can exit the program normally, but the ESC shortcut key cannot exit directly. It requires pressing the key three times to completely exit the program.
Expected behavior
the ESC shortcut key can exit the program normally just like the “close” option in the right-click menu.