Question / Help Disable and re enable sources

Sometimes i have to disable and re enable video sources to fix them, and make them output a signal. Is there a way to script that, or keybind that?
I have a streamdeck, and it would be really cool to be able to have a "fix" button that just does stuff like this.