Maybe this link can help.. https://resource.dopus.com/t/open-and-close-viewer-with-single-hotkey/37586