UI: Add opt. to enable/disable in-focus hotkey blocking
Adds an option to enable/disable blocking hotkeys when the window is in focus which is normally used in order to prevent hotkey/shortcut conflicts. This does not apply to the settings window; the hotkey behavior is unchanged with the settings window (in order to prevent hotkeys from being used while setting hotkeys for example). Closes obsproject/obs-studio#1267
This commit is contained in:
@@ -73,6 +73,9 @@ private:
|
||||
os_inhibit_t *sleepInhibitor = nullptr;
|
||||
int sleepInhibitRefs = 0;
|
||||
|
||||
bool enableHotkeysInFocus = true;
|
||||
|
||||
|
||||
std::deque<obs_frontend_translate_ui_cb> translatorHooks;
|
||||
|
||||
bool InitGlobalConfig();
|
||||
@@ -80,6 +83,8 @@ private:
|
||||
bool InitLocale();
|
||||
bool InitTheme();
|
||||
|
||||
inline void ResetHotkeyState(bool inFocus);
|
||||
|
||||
public:
|
||||
OBSApp(int &argc, char **argv, profiler_name_store_t *store);
|
||||
~OBSApp();
|
||||
@@ -87,6 +92,8 @@ public:
|
||||
void AppInit();
|
||||
bool OBSInit();
|
||||
|
||||
void EnableInFocusHotkeys(bool enable);
|
||||
|
||||
inline QMainWindow *GetMainWindow() const {return mainWindow.data();}
|
||||
|
||||
inline config_t *GlobalConfig() const {return globalConfig;}
|
||||
|
Reference in New Issue
Block a user