# Where are files for the hotkey settings file?



## ToddStOnge (Mar 28, 2019)

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:



Any help would be great!


----------



## dodgepong (Mar 28, 2019)

What feature are you working on?


----------



## ToddStOnge (Mar 29, 2019)

0001270, adding a hot key for the automatic scene switcher https://obsproject.com/mantis/view.php?id=1270


----------



## dodgepong (Mar 29, 2019)

What you should actually do is use obs_hotkey_register_frontend: https://obsproject.com/docs/scripting.html?highlight=hotkey#obs_hotkey_register_frontend


----------



## Suslik V (Apr 2, 2019)

Why your screenshot shows no pictures for the settings _General_, _Stream_, _Output_ etc. (that is on the left)?


----------



## ToddStOnge (Apr 2, 2019)

I was asking for the location of the hotkey settings specifically.


----------



## dodgepong (Apr 3, 2019)

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 (Apr 3, 2019)

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 (Apr 3, 2019)

I thought you were trying to add a hotkey for enabling or disabling the automatic scene switcher, no? That wouldn't be done with Python, that would be done in the C++ code of the automatic scene switcher. That will probably involve changing something in here: https://github.com/obsproject/obs-s...lugins/frontend-tools/auto-scene-switcher.cpp


----------



## Suslik V (Apr 6, 2019)

ToddStOnge said:


> I was asking for the location of the hotkey settings specifically.


I just wondering is this bug in obs or this is your custom build...


----------



## ToddStOnge (Apr 7, 2019)

Suslik V said:


> I just wondering is this bug in obs or this is your custom build...



I am attempting to add the feature shown in this link: https://obsproject.com/mantis/view.php?id=1270 and I am attempting to add the feature by 1st adding to the Hotkey Settings another space to toggle the automatic scene switcher to have the ability to edit in a prefered hotkey to toggle the said automatic scene switcher. As shown in this picture


----------



## ToddStOnge (Apr 7, 2019)

Suslik V said:


> I just wondering is this bug in obs or this is your custom build...


also the build I am using is behind a small amount


----------



## dodgepong (Apr 7, 2019)

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 (Apr 7, 2019)

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 (Apr 16, 2019)

nice explanation


dodgepong said:


> 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.
> 
> ...



thanks


----------



## untoldent (Oct 11, 2022)

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?


----------



## untoldent (Oct 11, 2022)

Replying to myself .... i posted this response in the wrong thread and didn't catch it in time. Apologies.


----------

