diff options
Diffstat (limited to 'src/autotype/mac/AutoTypeMac.h')
-rw-r--r-- | src/autotype/mac/AutoTypeMac.h | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/autotype/mac/AutoTypeMac.h b/src/autotype/mac/AutoTypeMac.h index 55963da51..904046e33 100644 --- a/src/autotype/mac/AutoTypeMac.h +++ b/src/autotype/mac/AutoTypeMac.h @@ -19,12 +19,12 @@ #ifndef KEEPASSX_AUTOTYPEMAC_H #define KEEPASSX_AUTOTYPEMAC_H -#include <Carbon/Carbon.h> +#include <ApplicationServices/ApplicationServices.h> #include <QtPlugin> #include <memory> -#include "autotype/AutoTypePlatformPlugin.h" #include "autotype/AutoTypeAction.h" +#include "autotype/AutoTypePlatformPlugin.h" class AutoTypePlatformMac : public QObject, public AutoTypePlatformInterface { @@ -48,20 +48,19 @@ public: bool raiseOwnWindow() override; void sendChar(const QChar& ch, bool isKeyDown); - void sendKey(Qt::Key key, bool isKeyDown, Qt::KeyboardModifiers modifiers); + void sendKey(Qt::Key key, bool isKeyDown, Qt::KeyboardModifiers modifiers = 0); signals: void globalShortcutTriggered(); private: - EventHotKeyRef m_hotkeyRef; - EventHotKeyID m_hotkeyId; - - static uint16 qtToNativeKeyCode(Qt::Key key); - static CGEventFlags qtToNativeModifiers(Qt::KeyboardModifiers modifiers, bool native); + static void hotkeyHandler(void* userData); + static CGKeyCode qtToNativeKeyCode(Qt::Key key); + static CGEventFlags qtToNativeModifiers(Qt::KeyboardModifiers modifiers); static int windowLayer(CFDictionaryRef window); static QString windowTitle(CFDictionaryRef window); - static OSStatus hotkeyHandler(EventHandlerCallRef nextHandler, EventRef theEvent, void *userData); + + void* m_globalMonitor; }; class AutoTypeExecutorMac : public AutoTypeExecutor @@ -77,4 +76,4 @@ private: AutoTypePlatformMac* const m_platform; }; -#endif // KEEPASSX_AUTOTYPEMAC_H +#endif // KEEPASSX_AUTOTYPEMAC_H |