Shortcuts / hotkeys for online web docks

PetitJabanes

New Member
Hi, I've developed a dynamic lower third consisting of a control panel to be used as a dock and a "receiver page" to be used as a browser source / overlay. The two communicate via Broadcast Channels in javascript. I've also implemented basic hotkey functionalities in javascript in the control panel page but, as soon as this window is not "in focus" (I've clicked elsewhere in the program) the hotkey triggers no longer work (understandingly). So, I wanted to use a LUA script to add hotkeys to OBS, as I've seen done on other projects but, my control panel and receiver window are hosted online (mainly because they run PHP) instead of locally, ergo I'm having trouble...

What I've seen done : a LUA script updates a local file, the file is read by a locally hosted web page (in html), the page triggers some action.
The thing is, in my case : the online page cannot read local files and the local LUA script in OBS can't talk to the distant web page in javascript (at least I don't know how to). I've tried passing the data from LUA to my web page via cookies, but they are encrypted, hence impossible to read or modify.

Can a LUA script somehow connect / send data through the js Broadcast Channels? How can I define "global" hotkeys to be registered my control panel dock?

The ultimate goal is to have the lower third show up by pushing a button on an Elgato Stream Deck.
Perhaps I'm going at it from the wrong angle...
 

upgradeQ

Member
There is a method called obs_source_send_key_click which let's you send a hotkey combination to a browser source. I've commented on obs-browser issues about it.
 

dodgepong

Administrator
Community Helper
I feel like using OBS hotkeys is a red herring if you ultimately want to control your overlays with a Stream Deck. I would instead look into figuring out how to get the Stream Deck to send HTTP requests on button pushes to an API on your overlay web server.
 

upgradeQ

Member
I have tried your method but it did not work. What to do now?.
Please provide more details, what exactly is not working ? Clarify. Did you followed instructions from this link?
 

mariah1902

New Member
Please provide more details, what exactly is not working ? Clarify. Did you followed instructions from this link?
Yes I have followed the instruction from this link and it did not work. The obs source send key link is not working for me. Other people seems like getting the solution for what they are suffering but I am not. I have followed exactly what the link told me to do but nothing happened. I still have the same problem.
 

upgradeQ

Member
Yes I have followed the instruction from this link and it did not work. The obs source send key link is not working for me. Other people seems like getting the solution for what they are suffering but I am not. I have followed exactly what the link told me to do but nothing happened. I still have the same problem.
Turns out I did not test it on real websites, now it should work ( platform GNU/Linux Ubuntu 18.04).
 

alorimer

New Member
Any updates on hotkeys for browser docks? The obs_source_send_key_click() method is great for browser sources, but there's no equivalent for browser docks. I've posted a new thread here asking about browser docks in specific.
 
Top