Auto scene switching when hotkey is released

geebee26

New Member
Hi, Part of my setup includes two camera feeds. I am using hotkeys to switch between them. My problem is that I sometimes to forget to switch from camera 2 to 1. What I would like to be able to do is to switch to camera 2 on pressing the hotkey and then back to camera 1 when I release it. I thought I may be able to do this with advanced scene switcher by setting a delay slightly longer than the natural key repeat delay so that only when I pressed the hotkey the natural repeat would keep cam 2 on and when I released the hotkey the scene would change but it seems that the scene switcher ignores key repeats and so just changes after the initial press. I can't set a preset time as this varies. I had also thought about using a USB HID footswitch that would allow a different action on press and release but the only one I can find that can do that is pretty expensive (over £100) and not available in the UK. I would be be very grateful for any advice.
 

geebee26

New Member
I have never actually written a script but it looks as though autohotkey would work and not overheat my brain! I'll try that and report back in case this is of use to anyone else. Thank you.
 

geebee26

New Member
Well, much to my surprise I have written something that actually works. This AHK script allows me to toggle between two scenes using a USB number pad:
Numpad1::
Send,6
return
Numpad1 Up::
Send, 555555
return
Esc::ExitApp
return
This allows me to send a hotkey 6 which I have set up for scene 2 when I press number 1 on my number pad and when I release number 1 I send a hotkey 5 which I have set up for scene 1. OBS needs to be the active window and the last line is just to close down the script using Esc. When I used a single 5 it occasionally wouldn't work so I put in a few 5s and things seem ok now. I am sure there will be a more elegant way to do this so suggestions welcome. Thanks cyclemat for pointing me in the right direction.
 
Top