2nd-keyboard
2nd-keyboard copied to clipboard
OBS not responding unless infocus
hey, concept of intercept is amazing, but for me unless i alt tab to obs the hotkeys dont work. im not able to start or stop recording or send any hotkey to obs while using chrome or any other window even if im staring at the desktop with obs minimised.
i've tried running obs as administrator didnt help
Okay, so I'm not entirely sure what you're trying to do. Your original message mentioned the super function keys (F13-24) _"i don't know if this matters. but im trying to use keys that are not there on most keyboards. like f13-f23 keys. everything other than obs works with those keys
i've also checked that f1-f12 works thruough intercept. but i want to use the f13-24 keys.
thing is if i use hid macros obs is fine with f13-f24 keys. only doesn't detect it (when not in focus) with intercept"_
Did you try to assign one of those keys in OBS itself? OBS's hotkeys SHOULD be global by default. And I did try F18 and it totally worked. (see screenshot.)
You can always use your secondary keyboard to just send regular keystrokes. Like this:
#if (getKeyState("F23", "P")) F23::return k::sendinput, !{F8} ;obs shortcut for "Start Recording" and "Stop Recording." #if
If a program does not have global hotkeys, you can still send keystrokes to it using ControlSend. You might have to activate it first, using ControlFocus. You can figure out the info that you need for those commands, using Window Spy. (it comes with autohotkey.)
https://autohotkey.com/docs/commands/ControlSend.htm https://autohotkey.com/docs/commands/ControlFocus.htm
For example, I created a global key to start/stop playback in premiere. Here is that code: https://github.com/TaranVH/2nd-keyboard/blob/9ee39aaccf9c58df9c4a7c19eb7d12ab5223872c/Almost_All_Premiere_Functions.ahk#L1678
though, I tried this for OBS, (shortcut is ctrl alt shift R) and it actually did not work: controlsend, Qt5QWindowIcon2, ^!+r, ahk_exe obs64.exe
But it does work if you just use sendinput, ^!+r because, again, OBS uses global hotkeys. Just make sure you aren't using that shortcut for anything else.
This is all the help I can provide. If you are still stuck, you must figure it out yourself.
yeah, im sorry. i acutally did not test it properly. but my latest findings were that OBS would not detect the macro input of intercept if it was not in focus. irrespective of what keystrokes i use as macros. i will try to make a video of the issue im facing and link it here
also, i should've mentioned this. but im using intercept on its own. im not using autohotkey because some forums and reddit post say that BattleEye (anitcheat for Rainbow Six Siege) issues ban against the use of AutoHotkey
OK. did a little googling about OBS Global Hotkeys. turns out if the keystrokes are sent at a high frequency OBS doesnt catch them. i confirmed this by using HIDMacros. i set one button to send F13 first using
- "HIDMacros.SendKeysSlow "{F15}", 50"
- "HIDMacros.SendKeysSlow "{F15}", 0"
when the delay is 0 OBS doesnt catch it. so now i need to find a way to add delay between keystrokes for intercept. any idea how to do that?
I have no idea. It's possible that a delay function is not even supported. Ask Kamaz - he created it. https://www.orbiter-forum.com/showthread.php?t=30829 IDK if he is even still around on the Orbiter forums (you need an account to see other user's activities.) If you do find an answer, please post it in this thread for the sake of anyone else who might have this problem.
Recap of issue: OBS would not detect macro sent by intercept when obs window is not infocus Reason for issue: OBS ignores (when not in focus) keystrokes that come too fast. Solution: I tweaked intercept to add 50ms delay to keystrokes from all keyboards but 1 main keyboard.
Download intercept from the link below. theres a readme file which hopefully helps get it setup.
https://drive.google.com/open?id=11eZdG-1bjx9vcXL25K_ybdXBXyASEswI
@TaranVH on a different note. do you know the code for F24 key? for F23 it is --> 6e,0,0|6e,0,1 but 6f,0,0|6f,0,1 is not F24.
Recap of issue: OBS would not detect macro sent by intercept when obs window is not infocus Reason for issue: OBS ignores (when not in focus) keystrokes that come too fast. Solution: I tweaked intercept to add 50ms delay to keystrokes from all keyboards but 1 main keyboard.
Download intercept from the link below. theres a readme file which hopefully helps get it setup.
https://drive.google.com/open?id=11eZdG-1bjx9vcXL25K_ybdXBXyASEswI
Forgive me. there is some issue with this solution. I will try to fix it and get back
ok. i fixed it. for some reason reading the keyboard file more than once caused intercept to crash. i've made it such that it reads it only once. it's working for now.
Side Note: you dont want to hold down any key on keyboards other than your main keyboard. it will lead to a HUGE delay (and possibly freeze intercept and hence rendering all keyboards useless).
the file in the link should have been updated
@TaranVH on a different note. do you know the code for F24 key? for F23 it is --> 6e,0,0|6e,0,1 but 6f,0,0|6f,0,1 is not F24.
F24 is SC076. So, 76,0,0|76,0,1 you can find all scan codes here: https://github.com/TaranVH/2nd-keyboard/blob/master/INFO_and_PROFILES/Table_of_all_scan_codes.xlsx
Well, found myself in this same issue. Same objectives, but trying to use it with StreamLabs OBS. Not detecting global, but it does detect HIDMacros. I would use HIDMacros if it wasn't blocking my ´´^^~~ inputs as my language uses it.
@Blaze99 Hope you still around so perhaps you can reup your intercept or give me guidance.
-- If I get any results, i'll be posting here
Alright, I found a solution really as @Blaze99 mentioned that the problem was the speed from keystrokes, it was relatively easy to manage this;
Instead of messing up with intercept, I started using SendEvend , {F13~F22}
on my F23 keyboard;
Also, with this on top to change the keystroke delay;
SetWorkingDir %A_ScriptDir%
if not A_IsAdmin
Run *RunAs "%A_ScriptFullPath%"
SetKeyDelay , 30 , 30
Running as admin to guarantee that everything works while unfocused cause Win10 sucks at this. Well, problem solved, if anyone needs any directions there it is.