TriggerHotkeyBySequence does not work with multiple keys

provisioncons

New Member
I am trying to press shift+F2.
Send it like this:

obs.send('TriggerHotkeyBySequence', {
'keyModifiers.shift': true,
'keyId':"OBS_KEY_F2",
});

Fires only F2

The same erro occurs on VBA
C:\vlearning\DP\OBSCommand\OBSCommand.exe /server=127.0.0.1:4444 /password=7491 /command=TriggerHotkeyBySequence,keyModifiers.shift=true,keyId=keyModifiers.OBS_KEY_F2


I tried just shift command and nothing happens
C:C:\vlearning\DP\OBSCommand\OBSCommand.exe /server=127.0.0.1:4444 /password=7491 /command=TriggerHotkeyBySequence,keyModifiers.shift=true,keyId=keyModifiers.OBS_KEY_SHIFT

Please, send me a tip
 

Reaby

Member
JavaScript:
obs.send('TriggerHotkeyBySequence',
    `{
        "keyId": "OBS_KEY_F2",
        "keyModifiers": {
            "shift": true
        }
    }`
);

Code:
OBSCommand.exe /command=TriggerHotkeyBySequence,keyModifiers=shift=true,keyId="OBS_KEY_F2"
 
JavaScript:
obs.send('TriggerHotkeyBySequence',
    `{
        "keyId": "OBS_KEY_F2",
        "keyModifiers": {
            "shift": true
        }
    }`
);

Thank you, @Reaby, for posting that Javascript code example... It was the only example of using Javascript to do an obs.send command!

For my scenario, this is what I got working by using an onclick to call a this Javascript function from an HTML button:

Code:
function toggleWebcam() {
    obs.send("TriggerHotkeyBySequence",    
        {"keyId": "OBS_KEY_NUMASTERISK", 
            "keyModifiers": 
                {"shift": true, 
                 "control": true
                }
        });
}
 

provisioncons

New Member
I am trying to change SceneCollection on OBS-Studio by VBA Command.
I´ve beet testing with this without sucess:

OBSCommand.exe /command=ScenesCollection,sc-name="Collection_2"

Is possible to change SceneCollection using Code?

Please, send me a tip

Best Regards
 

WBE

Member
Is possible to change SceneCollection using Code?
I don't have any experience with OBSCommand.exe but based on the documentation I'd guess:
OBSCommand.exe /command=SetCurrentSceneCollection,sc-name=Collection_2

Besides that, as this is not the same question as the original post of this thread, please start a new forum thread next time.
 
Top