Disable Quit on Esc

Older bugs which are supposed to be fixed in 0.84. *** Please try to reproduce your bug and confirm the bug fix. ***

Moderators: XnTriq, helmut, xnview, Dreamer

evolut1010
Posts: 3
Joined: Tue Mar 29, 2022 3:11 pm

Disable Quit on Esc

Post 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.
Franky
Posts: 249
Joined: Fri Mar 06, 2020 1:28 pm
Location: France - BZH

Re: Disable Quit on Esc

Post by Franky »

It's in Settings/Interface/Keyboard
XnView MP - Paramètre ESC.png
You do not have the required permissions to view the files attached to this post.
evolut1010
Posts: 3
Joined: Tue Mar 29, 2022 3:11 pm

Re: Disable Quit on Esc

Post 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.
User avatar
helmut
Posts: 8705
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Re: Disable Quit on Esc

Post 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)?
User avatar
xnview
Author of XnView
Posts: 44366
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Disable Quit on Esc

Post by xnview »

:bugconfirmed: Thanks to your detailed description I can reproduce
Pierre.
User avatar
xnview
Author of XnView
Posts: 44366
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Disable Quit on Esc

Post by xnview »

See issue for current status and some details.
Pierre.
User avatar
xnview
Author of XnView
Posts: 44366
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Disable Quit on Esc

Post by xnview »

This problem is supposed to be fixed in XnView MP 1.4.3. Please check and confirm the bug fix here.
Pierre.
dbplunkett
Posts: 4
Joined: Sun Apr 16, 2023 2:44 am

Re: Disable Quit on Esc

Post by dbplunkett »

This issue reliably reproduces for me on 1.4.3 64bits, on Windows 10.
User avatar
xnview
Author of XnView
Posts: 44366
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Disable Quit on Esc

Post by xnview »

please how do you reproduce?
Pierre.
dbplunkett
Posts: 4
Joined: Sun Apr 16, 2023 2:44 am

Re: Disable Quit on Esc

Post 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.
User avatar
user0
XnThusiast
Posts: 1802
Joined: Sat May 09, 2015 9:37 am

Re: Disable Quit on Esc

Post 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.
dbplunkett
Posts: 4
Joined: Sun Apr 16, 2023 2:44 am

Re: Disable Quit on Esc

Post 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.
User avatar
user0
XnThusiast
Posts: 1802
Joined: Sat May 09, 2015 9:37 am

Re: Disable Quit on Esc

Post 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

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.
You do not have the required permissions to view the files attached to this post.
Last edited by user0 on Wed Jul 26, 2023 8:30 am, edited 1 time in total.
evolut1010
Posts: 3
Joined: Tue Mar 29, 2022 3:11 pm

Re: Disable Quit on Esc

Post 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?).
User avatar
user0
XnThusiast
Posts: 1802
Joined: Sat May 09, 2015 9:37 am

Re: Disable Quit on Esc

Post 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