diff --git a/src/blackinput/keyboard.h b/src/blackinput/keyboard.h index 9284acfc2..bdd3606a6 100644 --- a/src/blackinput/keyboard.h +++ b/src/blackinput/keyboard.h @@ -57,7 +57,7 @@ namespace BlackInput * \param key * \param isPressed */ - virtual void triggerKey(const BlackMisc::Hardware::CKeyboardKey key, bool isPressed) = 0; + virtual void triggerKey(const BlackMisc::Hardware::CKeyboardKey &key, bool isPressed) = 0; //! Creates a native keyboard handler object static IKeyboard *getInstance(); diff --git a/src/blackinput/linux/keyboard_linux.cpp b/src/blackinput/linux/keyboard_linux.cpp index 6999c4a59..eaf5abd14 100644 --- a/src/blackinput/linux/keyboard_linux.cpp +++ b/src/blackinput/linux/keyboard_linux.cpp @@ -50,6 +50,7 @@ namespace BlackInput m_pressedKey.setKeyObject(CKeyboardKey()); } + void CKeyboardLinux::triggerKey(const CKeyboardKey &key, bool isPressed) { if(!isPressed) emit keyUp(key); else emit keyDown(key); diff --git a/src/blackinput/linux/keyboard_linux.h b/src/blackinput/linux/keyboard_linux.h index 0ec5ead86..5128e2249 100644 --- a/src/blackinput/linux/keyboard_linux.h +++ b/src/blackinput/linux/keyboard_linux.h @@ -36,7 +36,7 @@ namespace BlackInput virtual void startCapture(bool ignoreNextKey = false) override; //! \copydoc IKeyboard::triggerKey() - virtual void triggerKey(const BlackMisc::Hardware::CKeyboardKey key, bool isPressed) override; + virtual void triggerKey(const BlackMisc::Hardware::CKeyboardKey &key, bool isPressed) override; protected: diff --git a/src/blackinput/osx/keyboard_mac.cpp b/src/blackinput/osx/keyboard_mac.cpp index 3be18dd58..2851aa43d 100644 --- a/src/blackinput/osx/keyboard_mac.cpp +++ b/src/blackinput/osx/keyboard_mac.cpp @@ -37,6 +37,7 @@ namespace BlackInput m_pressedKey.setKeyObject(CKeyboardKey()); } + void CKeyboardMac::triggerKey(const CKeyboardKey &key, bool isPressed) { if(!isPressed) emit keyUp(key); else emit keyDown(key); diff --git a/src/blackinput/osx/keyboard_mac.h b/src/blackinput/osx/keyboard_mac.h index c389d7ab6..31be87341 100644 --- a/src/blackinput/osx/keyboard_mac.h +++ b/src/blackinput/osx/keyboard_mac.h @@ -33,7 +33,7 @@ namespace BlackInput virtual void startCapture(bool ignoreNextKey = false) override; //! \copydoc IKeyboard::triggerKey() - virtual void triggerKey(const BlackMisc::Hardware::CKeyboardKey key, bool isPressed) override; + virtual void triggerKey(const BlackMisc::Hardware::CKeyboardKey &key, bool isPressed) override; protected: diff --git a/src/blackinput/win/keyboard_windows.cpp b/src/blackinput/win/keyboard_windows.cpp index 77bfe5585..acf09cbd3 100644 --- a/src/blackinput/win/keyboard_windows.cpp +++ b/src/blackinput/win/keyboard_windows.cpp @@ -42,7 +42,7 @@ namespace BlackInput m_pressedKey.setKeyObject(CKeyboardKey()); } - void CKeyboardWindows::triggerKey(const CKeyboardKey key, bool isPressed) + void CKeyboardWindows::triggerKey(const CKeyboardKey &key, bool isPressed) { if(!isPressed) emit keyUp(key); else emit keyDown(key); diff --git a/src/blackinput/win/keyboard_windows.h b/src/blackinput/win/keyboard_windows.h index 13487ea16..882ab6ff6 100644 --- a/src/blackinput/win/keyboard_windows.h +++ b/src/blackinput/win/keyboard_windows.h @@ -38,7 +38,7 @@ namespace BlackInput virtual void startCapture(bool ignoreNextKey = false) override; //! \copydoc IKeyboard::triggerKey() - virtual void triggerKey(const BlackMisc::Hardware::CKeyboardKey key, bool isPressed) override; + virtual void triggerKey(const BlackMisc::Hardware::CKeyboardKey &key, bool isPressed) override; //! \brief Keyboard hook handle HHOOK keyboardHook() const { return m_keyboardHook; }