summaryrefslogtreecommitdiffhomepage
path: root/opentrack
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-07-25 06:55:12 +0200
committerStanislaw Halik <sthalik@misaki.pl>2015-07-25 06:57:30 +0200
commit61b6c69b3f36ebea142a55d0eb37601d99bcd522 (patch)
tree31010807b502132aa35c0af07e78e0a4c533bbb4 /opentrack
parente646166be460dce1553360463992d3df018d1906 (diff)
shortcuts: add missing keybindings
Diffstat (limited to 'opentrack')
-rw-r--r--opentrack/global-shortcuts.cpp13
-rw-r--r--opentrack/global-shortcuts.h4
2 files changed, 11 insertions, 6 deletions
diff --git a/opentrack/global-shortcuts.cpp b/opentrack/global-shortcuts.cpp
index 0fb5a2a5..f719e766 100644
--- a/opentrack/global-shortcuts.cpp
+++ b/opentrack/global-shortcuts.cpp
@@ -1,9 +1,3 @@
-#include <QList>
-#include <QKeySequence>
-#include <QVariant>
-#include <QDebug>
-#include "global-shortcuts.h"
-
#if defined(_WIN32)
# ifndef DIRECTINPUT_VERSION
# define DIRECTINPUT_VERSION 0x800
@@ -11,6 +5,12 @@
# include <windows.h>
# include <dinput.h>
+#include <QList>
+#include <QKeySequence>
+#include <QVariant>
+#include <QDebug>
+#include "global-shortcuts.h"
+
QList<win_key> windows_key_mods =
QList<win_key>({
win_key(DIK_LCONTROL, Qt::Key::Key_Control),
@@ -108,6 +108,7 @@ QList<win_key> windows_key_sequences =
win_key(DIK_Y, Qt::Key::Key_Y ),
win_key(DIK_Z, Qt::Key::Key_Z ),
win_key(DIK_RETURN, Qt::Key::Key_Return),
+ win_key(DIK_INSERT, Qt::Key::Key_Insert),
});
bool win_key::from_qt(QKeySequence qt_, int& dik, Qt::KeyboardModifiers& mods)
diff --git a/opentrack/global-shortcuts.h b/opentrack/global-shortcuts.h
index 2b25321b..8167036d 100644
--- a/opentrack/global-shortcuts.h
+++ b/opentrack/global-shortcuts.h
@@ -1,5 +1,7 @@
#pragma once
+#ifdef _WIN32
+
struct win_key;
extern QList<win_key> windows_key_mods;
@@ -12,3 +14,5 @@ struct win_key
Qt::Key qt;
static bool from_qt(QKeySequence qt_, int& dik, Qt::KeyboardModifiers &mods);
};
+
+#endif