autohotkeyobs-studio

ControlSend [Strg]+[Win]+[Numpad3] to OBS Studio


I try to send [Strg]+[Win]+[Numpad3] to OBS Studio to pause recording via an Autohotkey script. My current approach is the following one because I want to avoid that other applications react on this shortcut. For example Notepad++ changes with this the open tabs.

ControlSend, , ^#{Numpad3}, ahk_class Qt5QWindowIcon

Actually, nothing happens in OBS Studio. Even when using {Ctrl down} and {LWin down} it does not work. Do you have an idea?


Solution

  • Use SetKeyDelay (or use separate up & down events with delay inbetween) to make the key be hold down for a bit longer.
    Worked for me.

    ;hold down for 50ms
    SetKeyDelay, -1, 50
    ControlSend, , ^#{Numpad3}, ahk_class Qt5QWindowIcon