Image Viewer delete behaviour and confirmation suppresion

In global settings I have set delete confirmations to show only for network shares (i.e. when there is no recycle option available).

When deleting images on a network folder from within the viewer I get the delete confirmation dialog.
Ideally I would like to keep the confirmation for normal Delete key but skip it if I press Shift+Delete.

Upon inspecting the delete hotkey in the Image Viewer section I find the Show VIEWERCMD=delete command.

I am wondering if overriding it like this would be safe:

@keydown:none
Show VIEWERCMD=delete
@keydown:shift
Delete FORCE QUIET NORECYCLE

or would I need to use the VIEWERCMD again?

EDIT:
After testing the above using the Delete command as opposed to "Show VIEWERCMD=delete" does indeed delete the current file but does not make the viewer show the next one.

Appending Show VIEWERCMD=next makes it skip to the next one however the behavior is strange.

  • Deleting the last image if only one is left does not close the viewer.
  • Deleting the last image when there are images before it does not go back to the previous image
  • Deleting this way does not decrement the current image out of images in the status bar

As it seems this isnt the proper way I humbly request adding the same optional switches for VIEWERCMD=delete that exist for Delete : FORCE QUIET NORECYCLE

This seems to work:

Delete FORCE QUIET NORECYCLE
Show VIEWERCMD=refresh
1 Like

Seems I accepted your solution a bit prematurely and for that I apologize.
The above command works but with a caveat I just recently noticed.
Whenever I use it - it skips 1 image and displays the next one after it (if it exists).

For example lets say we have:
1.png
2.png
3.png
4.png
5.png

When going forward and viewing 2.png and deleting it via Shift+Del - the viewer skips to 4.png.
Hitting backspace returns to 3.png.
Deleting the last image (5.png) goes back to 4.png as it should.

Appending a Show VIEWPANECMD=prev would help in this case but break if we are at the last image.
E.g. Delete 5 (it goes to 4) and one back again to 3 (because of prev command).

Seems a bit counter-intuitive as opposed to the native VIEWERCMD=delete.

In the next beta we'll extend Show VIEWERCMD=delete to accept applicable Delete command arguments.

e.g. Show VIEWERCMD=delete,force,quiet,norecycle

Note that the next beta may be after the imminent 12.11 stable release. (The current 12.10.5 beta may be the last one before 12.11 so, unless we do a 12.10.6 beta, the change will be held back until 12.11.1 beta.)

1 Like

No worries, take your time. I'm just glad this will be addressed :smiley: