Where are files for the hotkey settings file?

ToddStOnge

New Member
Hello, I am working on an feature concerning the hotkeys and I would like to know where are the files to control the hotkey settings in obs studios. specifically the files controlling and displaying this:
hotkeysetting.PNG

Any help would be great!
 

Suslik V

Active Member
Why your screenshot shows no pictures for the settings General, Stream, Output etc. (that is on the left)?
 

dodgepong

Administrator
Forum Admin
It's here and here but it's not a hard-coded list of hotkeys. It's dynamically generated from things that register hotkeys using the function I linked to above. If you want your hotkey listed here, you use the function above. You don't hard-code it to this file.
 

ToddStOnge

New Member
Well, another question I should ask is how should I access the python scripting for obs to use that aforementioned function. As I am currently built the c++ part of the project.
 

dodgepong

Administrator
Forum Admin
Let me try to explain this again.

The way OBS's hotkey system works is that OBS has a list of all the things internally that can be hotkeyed. Plugins can add new hotkeys to this list by registering a hotkey with OBS. They do this by calling the obs_hotkey_register function for the corresponding plugin type. For example, sources can register hotkeys using obs_hotkey_register_source(). Here is an example in the slideshow source.

The Automatic Scene Switcher is a frontend tool, so it uses obs_hotkey_register_frontend(). Here is an example where the transition hotkeys are defined.

The Settings window then takes all these hotkeys and automatically lays them out in the corresponding sections.

So you don't need to edit the hotkeys UI, you just need to register a hotkey in the automatic scene switcher itself.
 

ToddStOnge

New Member
Thank you for explaining! I managed to get the hotkey registered in my build and I can continue working on it. Once again, thank you for your help.
 

fslharoon603

New Member
nice explanation
Let me try to explain this again.

The way OBS's hotkey system works is that OBS has a list of all the things internally that can be hotkeyed. Plugins can add new hotkeys to this list by registering a hotkey with OBS. They do this by calling the obs_hotkey_register function for the corresponding plugin type. For example, sources can register hotkeys using obs_hotkey_register_source(). Here is an example in the slideshow source.

The Automatic Scene Switcher is a frontend tool, so it uses obs_hotkey_register_frontend(). Here is an example where the transition hotkeys are defined.

The Settings window then takes all these hotkeys and automatically lays them out in the corresponding sections.

So you don't need to edit the hotkeys UI, you just need to register a hotkey in the automatic scene switcher itself.

thanks
 

untoldent

New Member
OBS Extended Touch Portal user here. The hotkey names are SlideShow.PreviousSlide and SlideShow.NextSlide.

But those seem generic? What happens if i have multiple slideshows, and i want to trigger a hotkey that advances one, but not the other?
 
Top