Open and close viewer with single hotkey

Is it possible to open and close image viewer with single hotkey? For example, select a file and press spacebar to view in image viewer and press spacebar again to close the image viewer (I have changed the next and previous ones with the arrow keys).

I use Enter with

Show VIEWERCMD=selectfile
Show VIEWERCMD=close

as Image Viewer hotkey.

1 Like

Thanks for your reply, I've tried it and it doesn't work with spacebar button. Do I miss something?

Nothing happens if I apply to button
2021-01-12_140849

Nothing happens if I apply to hotkey

To launch the viewer you'll need a toolbar hotkey with just the Show command. You could modify the existing Show Pictures button.

1 Like

Thanks again for your help, with this command I can open viewer with spacebar button, but how to close it with spacebar button too? Sorry for silly question because 100% I'm not a programmer.

2021-01-12_160730

The Standalone Image Viewer has its own buttons and hotkeys. So in total you need two definitions for the Space hotkey. The Image Viewer gets the one from my first post.

2 Likes

Ah, it's working now, many thanks for your help, I really appreciated.