summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--gui/main-window.cpp15
-rw-r--r--gui/options-dialog.cpp36
-rw-r--r--gui/options-dialog.ui473
-rw-r--r--logic/main-settings.hpp41
-rw-r--r--logic/work.cpp20
5 files changed, 470 insertions, 115 deletions
diff --git a/gui/main-window.cpp b/gui/main-window.cpp
index 046c6a44..d48e0b44 100644
--- a/gui/main-window.cpp
+++ b/gui/main-window.cpp
@@ -233,10 +233,17 @@ void MainWindow::register_shortcuts()
t_keys keys
{
- t_key(s.key_start_tracking, [&](bool) -> void { emit_start_tracker(); }, true),
- t_key(s.key_stop_tracking, [&](bool) -> void { emit_stop_tracker(); }, true),
- t_key(s.key_toggle_tracking, [&](bool) -> void { emit_toggle_tracker(); }, true),
- t_key(s.key_restart_tracking, [&](bool) -> void { emit_restart_tracker(); }, true),
+ t_key(s.key_start_tracking1, [&](bool) -> void { emit_start_tracker(); }, true),
+ t_key(s.key_start_tracking2, [&](bool) -> void { emit_start_tracker(); }, true),
+
+ t_key(s.key_stop_tracking1, [&](bool) -> void { emit_stop_tracker(); }, true),
+ t_key(s.key_stop_tracking2, [&](bool) -> void { emit_stop_tracker(); }, true),
+
+ t_key(s.key_toggle_tracking1, [&](bool) -> void { emit_toggle_tracker(); }, true),
+ t_key(s.key_toggle_tracking2, [&](bool) -> void { emit_toggle_tracker(); }, true),
+
+ t_key(s.key_restart_tracking1, [&](bool) -> void { emit_restart_tracker(); }, true),
+ t_key(s.key_restart_tracking2, [&](bool) -> void { emit_restart_tracker(); }, true),
};
global_shortcuts.reload(keys);
diff --git a/gui/options-dialog.cpp b/gui/options-dialog.cpp
index 51cfbcc7..cedb1e52 100644
--- a/gui/options-dialog.cpp
+++ b/gui/options-dialog.cpp
@@ -103,16 +103,32 @@ OptionsDialog::OptionsDialog(std::function<void(bool)> pause_keybindings) :
QPushButton* button;
} tuples[] =
{
- { main.key_center, ui.center_text, ui.bind_center },
- { main.key_toggle, ui.toggle_text, ui.bind_toggle },
- { main.key_toggle_press, ui.toggle_held_text, ui.bind_toggle_held },
- { main.key_zero, ui.zero_text, ui.bind_zero },
- { main.key_zero_press, ui.zero_held_text, ui.bind_zero_held },
- { main.key_start_tracking, ui.start_tracking_text, ui.bind_start },
- { main.key_stop_tracking, ui.stop_tracking_text , ui.bind_stop},
- { main.key_toggle_tracking, ui.toggle_tracking_text, ui.bind_toggle_tracking },
- { main.key_restart_tracking, ui.restart_tracking_text, ui.bind_restart_tracking },
- { main.key_disable_tcomp_press, ui.tcomp_off_held_text, ui.bind_tcomp_off_held },
+ { main.key_center1, ui.center_text, ui.bind_center },
+ { main.key_center2, ui.center_text_2, ui.bind_center_2 },
+
+ { main.key_toggle1, ui.toggle_text, ui.bind_toggle },
+ { main.key_toggle2, ui.toggle_text_2, ui.bind_toggle_2 },
+
+ { main.key_toggle_press1, ui.toggle_held_text, ui.bind_toggle_held },
+ { main.key_toggle_press2, ui.toggle_held_text_2, ui.bind_toggle_held_2 },
+
+ { main.key_zero1, ui.zero_text, ui.bind_zero },
+ { main.key_zero2, ui.zero_text_2, ui.bind_zero_2 },
+
+ { main.key_zero_press1, ui.zero_held_text, ui.bind_zero_held },
+ { main.key_zero_press2, ui.zero_held_text_2, ui.bind_zero_held_2 },
+
+ { main.key_start_tracking1, ui.start_tracking_text, ui.bind_start },
+ { main.key_start_tracking2, ui.start_tracking_text_2, ui.bind_start_2 },
+
+ { main.key_stop_tracking1, ui.stop_tracking_text , ui.bind_stop },
+ { main.key_stop_tracking2, ui.stop_tracking_text_2 , ui.bind_stop_2 },
+
+ { main.key_toggle_tracking1, ui.toggle_tracking_text, ui.bind_toggle_tracking },
+ { main.key_toggle_tracking2, ui.toggle_tracking_text_2, ui.bind_toggle_tracking_2 },
+
+ { main.key_restart_tracking1, ui.restart_tracking_text, ui.bind_restart_tracking },
+ { main.key_restart_tracking2, ui.restart_tracking_text_2, ui.bind_restart_tracking_2 },
};
for (const tmp& val_ : tuples)
diff --git a/gui/options-dialog.ui b/gui/options-dialog.ui
index 2226480b..3dea2f4e 100644
--- a/gui/options-dialog.ui
+++ b/gui/options-dialog.ui
@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>607</width>
- <height>596</height>
+ <height>575</height>
</rect>
</property>
<property name="minimumSize">
@@ -49,6 +49,9 @@
<string>Global shortcuts</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_8">
+ <property name="leftMargin">
+ <number>0</number>
+ </property>
<item>
<widget class="QLabel" name="label_23">
<property name="sizePolicy">
@@ -72,66 +75,224 @@
</property>
<layout class="QGridLayout" name="gridLayout_8">
<property name="leftMargin">
- <number>4</number>
+ <number>9</number>
</property>
<property name="rightMargin">
- <number>0</number>
+ <number>2</number>
</property>
<property name="horizontalSpacing">
<number>20</number>
</property>
- <item row="8" column="1">
- <widget class="QLabel" name="zero_held_text">
+ <item row="11" column="1">
+ <widget class="QLabel" name="toggle_tracking_text">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="text">
<string/>
</property>
</widget>
</item>
- <item row="6" column="2">
- <widget class="QPushButton" name="bind_toggle_held">
+ <item row="9" column="0">
+ <widget class="QLabel" name="textLabel2_7">
<property name="text">
- <string>Bind</string>
+ <string>Start tracking</string>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
</property>
</widget>
</item>
- <item row="8" column="2">
- <widget class="QPushButton" name="bind_zero_held">
+ <item row="10" column="2">
+ <widget class="QPushButton" name="bind_stop">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="text">
<string>Bind</string>
</property>
</widget>
</item>
- <item row="12" column="0">
- <widget class="QLabel" name="textLabel2_10">
+ <item row="0" column="1">
+ <widget class="QLabel" name="center_text">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="text">
- <string>Restart tracking</string>
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="10" column="0">
+ <widget class="QLabel" name="textLabel2_8">
+ <property name="text">
+ <string>Stop tracking</string>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0">
+ <widget class="QLabel" name="textLabel2_3">
+ <property name="text">
+ <string>Center</string>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="1">
+ <widget class="QLabel" name="toggle_text">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="7" column="0">
+ <widget class="QLabel" name="textLabel2_6">
+ <property name="text">
+ <string>Zero</string>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="7" column="1">
+ <widget class="QLabel" name="zero_text">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="8" column="0">
+ <widget class="QLabel" name="label_28">
+ <property name="text">
+ <string>Zero while held</string>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="0">
+ <widget class="QLabel" name="textLabel2_5">
+ <property name="text">
+ <string>Toggle</string>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
+ <item row="0" column="2">
+ <widget class="QPushButton" name="bind_center">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Bind</string>
+ </property>
+ </widget>
+ </item>
+ <item row="8" column="1">
+ <widget class="QLabel" name="zero_held_text">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
<item row="6" column="1">
<widget class="QLabel" name="toggle_held_text">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="text">
<string/>
</property>
</widget>
</item>
- <item row="12" column="1">
- <widget class="QLabel" name="restart_tracking_text">
+ <item row="6" column="2">
+ <widget class="QPushButton" name="bind_toggle_held">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="text">
- <string/>
+ <string>Bind</string>
</property>
</widget>
</item>
- <item row="12" column="2">
- <widget class="QPushButton" name="bind_restart_tracking">
+ <item row="12" column="0">
+ <widget class="QLabel" name="textLabel2_10">
+ <property name="text">
+ <string>Restart tracking</string>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="8" column="2">
+ <widget class="QPushButton" name="bind_zero_held">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="text">
<string>Bind</string>
</property>
</widget>
</item>
+ <item row="12" column="1">
+ <widget class="QLabel" name="restart_tracking_text">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
<item row="6" column="0">
<widget class="QLabel" name="label_27">
<property name="text">
@@ -139,8 +300,14 @@
</property>
</widget>
</item>
- <item row="11" column="2">
- <widget class="QPushButton" name="bind_toggle_tracking">
+ <item row="12" column="2">
+ <widget class="QPushButton" name="bind_restart_tracking">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="text">
<string>Bind</string>
</property>
@@ -156,8 +323,27 @@
</property>
</widget>
</item>
+ <item row="11" column="2">
+ <widget class="QPushButton" name="bind_toggle_tracking">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Bind</string>
+ </property>
+ </widget>
+ </item>
<item row="5" column="2">
<widget class="QPushButton" name="bind_toggle">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="text">
<string>Bind</string>
</property>
@@ -165,159 +351,285 @@
</item>
<item row="9" column="2">
<widget class="QPushButton" name="bind_start">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="text">
<string>Bind</string>
</property>
</widget>
</item>
+ <item row="10" column="1">
+ <widget class="QLabel" name="stop_tracking_text">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
<item row="9" column="1">
<widget class="QLabel" name="start_tracking_text">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="text">
<string/>
</property>
</widget>
</item>
- <item row="10" column="1">
- <widget class="QLabel" name="stop_tracking_text">
+ <item row="5" column="3">
+ <widget class="QLabel" name="toggle_text_2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="text">
<string/>
</property>
</widget>
</item>
- <item row="9" column="0">
- <widget class="QLabel" name="textLabel2_7">
- <property name="text">
- <string>Start tracking</string>
+ <item row="5" column="4">
+ <widget class="QPushButton" name="bind_toggle_2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
</property>
- <property name="wordWrap">
- <bool>false</bool>
+ <property name="text">
+ <string>Bind</string>
</property>
</widget>
</item>
- <item row="11" column="1">
- <widget class="QLabel" name="toggle_tracking_text">
+ <item row="0" column="3">
+ <widget class="QLabel" name="center_text_2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="text">
<string/>
</property>
</widget>
</item>
- <item row="10" column="2">
- <widget class="QPushButton" name="bind_stop">
+ <item row="0" column="4">
+ <widget class="QPushButton" name="bind_center_2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="text">
<string>Bind</string>
</property>
</widget>
</item>
- <item row="0" column="1">
- <widget class="QLabel" name="center_text">
+ <item row="7" column="2">
+ <widget class="QPushButton" name="bind_zero">
<property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>3</horstretch>
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
- <string/>
+ <string>Bind</string>
</property>
</widget>
</item>
- <item row="10" column="0">
- <widget class="QLabel" name="textLabel2_8">
- <property name="text">
- <string>Stop tracking</string>
+ <item row="6" column="4">
+ <widget class="QPushButton" name="bind_toggle_held_2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
</property>
- <property name="wordWrap">
- <bool>false</bool>
+ <property name="text">
+ <string>Bind</string>
</property>
</widget>
</item>
- <item row="0" column="0">
- <widget class="QLabel" name="textLabel2_3">
+ <item row="6" column="3">
+ <widget class="QLabel" name="toggle_held_text_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>7</horstretch>
+ <horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
- <string>Center</string>
- </property>
- <property name="wordWrap">
- <bool>false</bool>
+ <string/>
</property>
</widget>
</item>
- <item row="7" column="1">
- <widget class="QLabel" name="zero_text">
+ <item row="7" column="3">
+ <widget class="QLabel" name="zero_text_2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="text">
<string/>
</property>
</widget>
</item>
- <item row="7" column="0">
- <widget class="QLabel" name="textLabel2_6">
- <property name="text">
- <string>Zero</string>
+ <item row="7" column="4">
+ <widget class="QPushButton" name="bind_zero_2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
</property>
- <property name="wordWrap">
- <bool>false</bool>
+ <property name="text">
+ <string>Bind</string>
</property>
</widget>
</item>
- <item row="5" column="1">
- <widget class="QLabel" name="toggle_text">
+ <item row="8" column="3">
+ <widget class="QLabel" name="zero_held_text_2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="text">
<string/>
</property>
</widget>
</item>
- <item row="8" column="0">
- <widget class="QLabel" name="label_28">
+ <item row="8" column="4">
+ <widget class="QPushButton" name="bind_zero_held_2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="text">
- <string>Zero while held</string>
+ <string>Bind</string>
</property>
</widget>
</item>
- <item row="0" column="2">
- <widget class="QPushButton" name="bind_center">
+ <item row="9" column="3">
+ <widget class="QLabel" name="start_tracking_text_2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="text">
- <string>Bind</string>
+ <string/>
</property>
</widget>
</item>
- <item row="5" column="0">
- <widget class="QLabel" name="textLabel2_5">
+ <item row="9" column="4">
+ <widget class="QPushButton" name="bind_start_2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="text">
- <string>Toggle</string>
+ <string>Bind</string>
</property>
- <property name="wordWrap">
- <bool>false</bool>
+ </widget>
+ </item>
+ <item row="10" column="3">
+ <widget class="QLabel" name="stop_tracking_text_2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
</property>
</widget>
</item>
- <item row="7" column="2">
- <widget class="QPushButton" name="bind_zero">
+ <item row="10" column="4">
+ <widget class="QPushButton" name="bind_stop_2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="text">
<string>Bind</string>
</property>
</widget>
</item>
- <item row="13" column="0">
- <widget class="QLabel" name="label_30">
+ <item row="11" column="3">
+ <widget class="QLabel" name="toggle_tracking_text_2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="text">
- <string>Relative translation off while held</string>
+ <string/>
</property>
</widget>
</item>
- <item row="13" column="1">
- <widget class="QLabel" name="tcomp_off_held_text">
+ <item row="11" column="4">
+ <widget class="QPushButton" name="bind_toggle_tracking_2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Bind</string>
+ </property>
+ </widget>
+ </item>
+ <item row="12" column="3">
+ <widget class="QLabel" name="restart_tracking_text_2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="text">
<string/>
</property>
</widget>
</item>
- <item row="13" column="2">
- <widget class="QPushButton" name="bind_tcomp_off_held">
+ <item row="12" column="4">
+ <widget class="QPushButton" name="bind_restart_tracking_2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="text">
<string>Bind</string>
</property>
@@ -1746,7 +2058,6 @@
<tabstop>bind_stop</tabstop>
<tabstop>bind_toggle_tracking</tabstop>
<tabstop>bind_restart_tracking</tabstop>
- <tabstop>bind_tcomp_off_held</tabstop>
<tabstop>trayp</tabstop>
<tabstop>tray_start</tabstop>
<tabstop>use_center_as_translation_camera_offset</tabstop>
diff --git a/logic/main-settings.hpp b/logic/main-settings.hpp
index 203f531a..f66bff7d 100644
--- a/logic/main-settings.hpp
+++ b/logic/main-settings.hpp
@@ -102,10 +102,15 @@ struct main_settings
value<int> center_method;
value<int> neck_y, neck_z;
value<bool> neck_enable;
- key_opts key_start_tracking, key_stop_tracking, key_toggle_tracking, key_restart_tracking;
- key_opts key_center, key_toggle, key_zero;
- key_opts key_toggle_press, key_zero_press;
- key_opts key_disable_tcomp_press;
+ key_opts key_start_tracking1, key_start_tracking2;
+ key_opts key_stop_tracking1, key_stop_tracking2;
+ key_opts key_toggle_tracking1, key_toggle_tracking2;
+ key_opts key_restart_tracking1, key_restart_tracking2;
+ key_opts key_center1, key_center2;
+ key_opts key_toggle1, key_toggle2;
+ key_opts key_zero1, key_zero2;
+ key_opts key_toggle_press1, key_toggle_press2;
+ key_opts key_zero_press1, key_zero_press2;
value<bool> tracklogging_enabled;
value<QString> tracklogging_filename;
main_settings() :
@@ -135,16 +140,24 @@ struct main_settings
neck_y(b, "neck-height", 0),
neck_z(b, "neck-depth", 0),
neck_enable(b, "neck-enable", false),
- key_start_tracking(b, "start-tracking"),
- key_stop_tracking(b, "stop-tracking"),
- key_toggle_tracking(b, "toggle-tracking"),
- key_restart_tracking(b, "restart-tracking"),
- key_center(b, "center"),
- key_toggle(b, "toggle"),
- key_zero(b, "zero"),
- key_toggle_press(b, "toggle-press"),
- key_zero_press(b, "zero-press"),
- key_disable_tcomp_press(b, "disable-translation-compensation-while-held"),
+ key_start_tracking1(b, "start-tracking"),
+ key_start_tracking2(b, "start-tracking-alt"),
+ key_stop_tracking1(b, "stop-tracking"),
+ key_stop_tracking2(b, "stop-tracking-alt"),
+ key_toggle_tracking1(b, "toggle-tracking"),
+ key_toggle_tracking2(b, "toggle-tracking-alt"),
+ key_restart_tracking1(b, "restart-tracking"),
+ key_restart_tracking2(b, "restart-tracking-alt"),
+ key_center1(b, "center"),
+ key_center2(b, "center-alt"),
+ key_toggle1(b, "toggle"),
+ key_toggle2(b, "toggle-alt"),
+ key_zero1(b, "zero"),
+ key_zero2(b, "zero-alt"),
+ key_toggle_press1(b, "toggle-press"),
+ key_toggle_press2(b, "toggle-press-alt"),
+ key_zero_press1(b, "zero-press"),
+ key_zero_press2(b, "zero-press-alt"),
tracklogging_enabled(b, "tracklogging-enabled", false),
tracklogging_filename(b, "tracklogging-filename", QString())
{
diff --git a/logic/work.cpp b/logic/work.cpp
index d2a16139..ebac4c39 100644
--- a/logic/work.cpp
+++ b/logic/work.cpp
@@ -67,12 +67,20 @@ Work::Work(Mappings& m, SelectedLibraries& libs, WId handle) :
sc(std::make_shared<Shortcuts>()),
handle(handle),
keys {
- key_tuple(s.key_center, [&](bool) -> void { tracker->center(); }, true),
- key_tuple(s.key_toggle, [&](bool) -> void { tracker->toggle_enabled(); }, true),
- key_tuple(s.key_zero, [&](bool) -> void { tracker->zero(); }, true),
- key_tuple(s.key_toggle_press, [&](bool x) -> void { tracker->set_toggle(!x); }, false),
- key_tuple(s.key_zero_press, [&](bool x) -> void { tracker->set_zero(x); }, false),
- key_tuple(s.key_disable_tcomp_press, [&](bool x) { tracker->set_tcomp_disabled(x); }, false),
+ key_tuple(s.key_center1, [&](bool) -> void { tracker->center(); }, true),
+ key_tuple(s.key_center2, [&](bool) -> void { tracker->center(); }, true),
+
+ key_tuple(s.key_toggle1, [&](bool) -> void { tracker->toggle_enabled(); }, true),
+ key_tuple(s.key_toggle2, [&](bool) -> void { tracker->toggle_enabled(); }, true),
+
+ key_tuple(s.key_zero1, [&](bool) -> void { tracker->zero(); }, true),
+ key_tuple(s.key_zero2, [&](bool) -> void { tracker->zero(); }, true),
+
+ key_tuple(s.key_toggle_press1, [&](bool x) -> void { tracker->set_toggle(!x); }, false),
+ key_tuple(s.key_toggle_press2, [&](bool x) -> void { tracker->set_toggle(!x); }, false),
+
+ key_tuple(s.key_zero_press1, [&](bool x) -> void { tracker->set_zero(x); }, false),
+ key_tuple(s.key_zero_press2, [&](bool x) -> void { tracker->set_zero(x); }, false),
}
{
reload_shortcuts();