Page 1 of 2

Disable Quit on Esc

Posted: Tue Mar 29, 2022 3:26 pm
by evolut1010
I have Startup set to Normal & Interface>Keyboard>'Pressing Esc once quits XnViewMp' to Never. Yet when I open an image and hit esc XnView closes. My desired behavior is that esc should do nothing if not in fullscreen mode (the standard behavior of 99% of other programs (chrome, vlc, firefox, notepad, photoshop, word, etc.)), or alternatively open the current tab/image in the Browser. It is very unnatural for esc to close an application without warning. It the very least there should be a one-time 'Do you want to quit?/Remember my answer?' dialog if people want to keep this behavior. I understand esc is acceptable to close windows that are fullscreen, but not to quit a windowed application.

This posts alludes to a hidden setting in classic but does not mention how to enable it or if it is available in MP viewtopic.php?f=35&t=17078&p=163032&hilit=esc#p163032.

Re: Disable Quit on Esc

Posted: Tue Mar 29, 2022 4:01 pm
by Franky
It's in Settings/Interface/Keyboard
XnView MP - Paramètre ESC.png

Re: Disable Quit on Esc

Posted: Tue Mar 29, 2022 6:46 pm
by evolut1010
I specifically mentioned that I have Interface>Keyboard>'Pressing Esc once quits XnViewMp' set to Never. That option is only used when opening XnView directly, not when double clicking an image which opens XnView in 'normal' mode.

Re: Disable Quit on Esc

Posted: Mon Apr 04, 2022 8:20 pm
by helmut
EDIT: I've just retried and reread your post. The key to reproduce the behaviour is setting "General | General | Mode when starting with a file: "Normal". When using this setting I could reproduce your problem. Not 100% sure but to me this looks like a bug. :bug:
___

Thank you for your problem report, evolut1010. I've just tried out using XnView MP 0.99.7 on Windows 10 and experienced the following behaviour:

1. Start Windows Explorer and browse a folder with JPEG image files.
2. Double-click in JPEG image file. (Previously, XnView MP was associated to JPEG files).
3. XnView MP starts and image is shown in Fullscreen.
4. I press "Esc".
--> Fullscreen is closed and XnView switches to browser mode.

I've changed various settings (e.g. deactivated "Launch browser at startup") but I couldn't reproduce the behaviour that you describe above. Could you perhaps try and reset your XnView configuration (see topic MP: How to reset program configuration)?

Re: Disable Quit on Esc

Posted: Mon Apr 11, 2022 12:39 pm
by xnview
:bugconfirmed: Thanks to your detailed description I can reproduce

Re: Disable Quit on Esc

Posted: Sun Jan 29, 2023 10:29 am
by xnview
See issue for current status and some details.

Re: Disable Quit on Esc

Posted: Mon Feb 27, 2023 10:08 am
by xnview
This problem is supposed to be fixed in XnView MP 1.4.3. Please check and confirm the bug fix here.

Re: Disable Quit on Esc

Posted: Fri Apr 21, 2023 6:23 pm
by dbplunkett
This issue reliably reproduces for me on 1.4.3 64bits, on Windows 10.

Re: Disable Quit on Esc

Posted: Sat Apr 22, 2023 2:17 pm
by xnview
please how do you reproduce?

Re: Disable Quit on Esc

Posted: Sat Apr 22, 2023 2:50 pm
by dbplunkett
Go to Settings > Interface > Keyboard.
Set 'Pressing Esc one quits XnViewMP' to 'Never' and click OK.
Double-click an image file to open XnViewMP.
Press Esc.

Expected: XnViewMP stays open.
Actual: XnViewMP closes.

Full version info:
XnView MP Windows
Version 1.4.3 64bits (Feb 25 2023)
Libformat version 7.138

I am not formally testing, so this isn't a fresh install. I installed a few days ago and may have customized one or two other settings since then, but I'm not sure if I did. I can say that I have Settings > General > General > 'Mode when starting with a file' set to 'Viewer'. I'm not sure if that's the default.

Re: Disable Quit on Esc

Posted: Sat Apr 22, 2023 6:14 pm
by user0
dbplunkett wrote: Sat Apr 22, 2023 2:50 pm Expected: XnViewMP stays open.
So what exactly do you expect to see, app window witout any tab?
As far as I can see the closes result is app with single <Empty> tab

1. goto Settings > Interface > Tabs
2. untick 'Closing last tab exits XnView' checkbox

ps. regardless of the outcome of this thread, I would appreciate that the DEFAULT behavior remains the same - ESC closes app that has been opened with file.

Re: Disable Quit on Esc

Posted: Sat Apr 22, 2023 6:31 pm
by dbplunkett
Oh, I see - it's closing the tab, not the application. But I had "Closing last tab exits XnViewMP" selected.

So this is not a bug, sorry.

Is there a way to disable closing the tab with Esc? I habitually hit Esc to clear any potential popups/selections/highlights, and it's surprising to me as a user that Esc also closes my current tab. I can't find an option in the settings related to this.

Re: Disable Quit on Esc

Posted: Sat Apr 22, 2023 7:25 pm
by user0
dbplunkett wrote: Sat Apr 22, 2023 6:31 pm Is there a way to disable closing the tab with Esc?
hm, it looks like you can achieve desired behaviour by messing with shortcuts:
- goto shortcuts
- assign ESC to any action, e.g. cmd_emptyImage
however, it will stop quitting fullscreen via ESC as well
tab_block_ESC.png
tab_block_ESC.png (2.64 KiB) Viewed 8080 times

I guess its worth adding 'Pressing ESC closes tab' checkbox or similar dropdown somewhere in Settings.
Would not say it is ideal as Settings a little bit messy, but I cannot suggest any other improvent for now.

Re: Disable Quit on Esc

Posted: Wed Jul 26, 2023 7:13 am
by evolut1010
In case anyone is still wondering the esc behavior is still incorrect in the latest release imo.

Current Behavior:
-Double click jpg (in windows explorer)
-xnview opens in viewer mode (intentionally not viewer fullscreen)
-hit esc
-xnview closes

Desired Behavior:
-Double click jpg (in windows explorer)
-xnview opens in viewer mode (intentionally not viewer fullscreen)
-hit esc
-do nothing, or go to browser mode with the folder containing the jpg (similar to dbl clicking the image in the viewer)

I can't think of any other application (which has minimize, maximize, and close buttons) that quits itself when pressing esc (that is what the ctrl+q shortcut is suppose to do). Esc is almost universally associated with 'exit fullscreen mode', not 'quit'.

You can't argue pressing esc closes the last tab (which effectively closes xnview) because that behavior does not apply to the brower mode. In browser mode (with no additional viewer tabs open) hitting esc does not quit xnview (that would feel wrong). Therefor why would pressing esc in viewer mode (with no other tabs open) quit xnview?

IMO, the only thing esc should do is exit 'viewer fullscreen' to regular 'viewer' (and then optionally hitting esc again should go to browser mode). It seems like user0 disagrees with that DEFAULT but that is the behavior of nearly every other computer program. If your intention is to quit the app, then you need to press ctrl+q.

I tried setting the viewer's 'browse' shortcut to 'esc', but that does not seem to work (bug?).

Re: Disable Quit on Esc

Posted: Wed Jul 26, 2023 1:21 pm
by user0
evolut1010 wrote: Wed Jul 26, 2023 7:13 am I can't think of any other application (which has minimize, maximize, and close buttons) that quits itself when pressing esc (that is what the ctrl+q shortcut is suppose to do). Esc is almost universally associated with 'exit fullscreen mode', not 'quit'.

IMO, the only thing esc should do is exit 'viewer fullscreen' to regular 'viewer' (and then optionally hitting esc again should go to browser mode). It seems like user0 disagrees with that DEFAULT but that is the behavior of nearly every other computer program. If your intention is to quit the app, then you need to press ctrl+q.
guess its standard for image viewers to quit via ESC
  • most viewers quits via ESC
    - ACDSee (in "Quick view" mode)
    - FastStone
    - IrfanView
    - MS Photos
    - ImageGlass
  • do not quit via ECS
    - ACDSee (in all other mode)
    - nomacs
however it gets a bit complicated/confusing when there are multiple tabs (+tabs of different types (browser/viewer))

evolut1010 wrote: Wed Jul 26, 2023 7:13 am You can't argue pressing esc closes the last tab (which effectively closes xnview) because that behavior does not apply to the brower mode. In browser mode (with no additional viewer tabs open) hitting esc does not quit xnview (that would feel wrong). Therefor why would pressing esc in viewer mode (with no other tabs open) quit xnview?
yeah, polishing is needed
1.4.5 - general - Pressing Esc once quits XnViewMP

evolut1010 wrote: Wed Jul 26, 2023 7:13 am I tried setting the viewer's 'browse' shortcut to 'esc', but that does not seem to work (bug?).
the method, I described in my prev post above, still works for me