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:
jp9000
2018-05-06 16:48:27 -07:00
parent a75724d8a5
commit 051c58eeb7
5 changed files with 208 additions and 15 deletions

View File

@@ -144,7 +144,7 @@
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<y>-44</y>
<width>801</width>
<height>741</height>
</rect>
@@ -733,8 +733,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>818</width>
<height>697</height>
<width>601</width>
<height>640</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_21">
@@ -3372,8 +3372,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>69</height>
<width>63</width>
<height>16</height>
</rect>
</property>
</widget>
@@ -3768,8 +3768,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>818</width>
<height>697</height>
<width>98</width>
<height>28</height>
</rect>
</property>
<layout class="QFormLayout" name="hotkeyLayout">
@@ -3816,7 +3816,7 @@
<x>0</x>
<y>0</y>
<width>803</width>
<height>761</height>
<height>793</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_16">
@@ -3844,6 +3844,12 @@
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<property name="labelAlignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="topMargin">
<number>2</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="processPriorityLabel">
<property name="text">
@@ -3857,6 +3863,19 @@
<item row="0" column="1">
<widget class="QComboBox" name="processPriority"/>
</item>
<item row="1" column="0">
<spacer name="horizontalSpacer_13">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>170</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
@@ -3872,6 +3891,9 @@
<property name="labelAlignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="topMargin">
<number>2</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="rendererLabel">
<property name="text">
@@ -4044,6 +4066,19 @@
</property>
</widget>
</item>
<item row="4" column="0">
<spacer name="horizontalSpacer_12">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>170</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
@@ -4056,6 +4091,12 @@
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<property name="labelAlignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="topMargin">
<number>2</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="monitoringDeviceLabel">
<property name="text">
@@ -4076,6 +4117,19 @@
</property>
</widget>
</item>
<item row="1" column="0">
<spacer name="horizontalSpacer_11">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>170</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
@@ -4091,6 +4145,9 @@
<property name="labelAlignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="topMargin">
<number>2</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
@@ -4153,6 +4210,19 @@
</property>
</widget>
</item>
<item row="1" column="0">
<spacer name="horizontalSpacer_10">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>170</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
@@ -4165,6 +4235,9 @@
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<property name="labelAlignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="topMargin">
<number>2</number>
</property>
@@ -4254,6 +4327,19 @@
</property>
</widget>
</item>
<item row="2" column="0">
<spacer name="horizontalSpacer_9">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>170</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
@@ -4266,6 +4352,12 @@
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<property name="labelAlignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="topMargin">
<number>2</number>
</property>
<item row="0" column="1">
<widget class="QCheckBox" name="reconnectEnable">
<property name="text">
@@ -4335,6 +4427,19 @@
</property>
</widget>
</item>
<item row="0" column="0">
<spacer name="horizontalSpacer_8">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>170</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
@@ -4347,9 +4452,12 @@
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<item row="0" column="1">
<widget class="QComboBox" name="bindToIP"/>
</item>
<property name="labelAlignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="topMargin">
<number>2</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="label_27">
<property name="text">
@@ -4360,6 +4468,9 @@
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="bindToIP"/>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="enableNewSocketLoop">
<property name="text">
@@ -4377,6 +4488,51 @@
</property>
</widget>
</item>
<item row="1" column="0">
<spacer name="horizontalSpacer_7">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>170</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_17">
<property name="title">
<string>Basic.Settings.Hotkeys</string>
</property>
<layout class="QFormLayout" name="formLayout_33">
<property name="topMargin">
<number>2</number>
</property>
<item row="0" column="1">
<widget class="QCheckBox" name="disableFocusHotkeys">
<property name="text">
<string>Basic.Settings.Advanced.Hotkeys.DisableHotkeysInFocus</string>
</property>
</widget>
</item>
<item row="0" column="0">
<spacer name="horizontalSpacer_14">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>170</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>