diff options
Diffstat (limited to 'src/components/chatinput.cpp')
-rw-r--r-- | src/components/chatinput.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/components/chatinput.cpp b/src/components/chatinput.cpp index 24fc22b..c802413 100644 --- a/src/components/chatinput.cpp +++ b/src/components/chatinput.cpp @@ -1,5 +1,6 @@ #include "chatinput.hpp" #include "constants.hpp" +#include "misc/events.hpp" #include <filesystem> ChatInputText::ChatInputText() { @@ -41,12 +42,14 @@ bool ChatInputText::ProcessKeyPress(GdkEventKey *event) { return true; } + const auto shortcut = EventsUtil::shortcut_key(event); + #ifdef __APPLE__ - if ((event->state & GDK_MOD2_MASK) && event->keyval == GDK_KEY_v) { + if ((event->state & GDK_MOD2_MASK) && shortcut == GDK_KEY_v) { return CheckHandleClipboardPaste(); } #else - if ((event->state & GDK_CONTROL_MASK) && event->keyval == GDK_KEY_v) { + if ((event->state & GDK_CONTROL_MASK) && shortcut == GDK_KEY_v) { return CheckHandleClipboardPaste(); } #endif |