summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-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