From 371fb66bdfe450af7def7056aeb25320a2446d23 Mon Sep 17 00:00:00 2001 From: Xiao YiFang Date: Sun, 11 Sep 2022 09:36:39 +0800 Subject: [PATCH] Revert "fix:ctrl +c triggered unintentionally" This reverts commit a7cdb9dd7213dedd496063938e249ca32b32130b. --- hotkeywrapper.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hotkeywrapper.cc b/hotkeywrapper.cc index 5162cc09..1a26d9a4 100644 --- a/hotkeywrapper.cc +++ b/hotkeywrapper.cc @@ -158,7 +158,7 @@ bool HotkeyWrapper::checkState(quint32 vk, quint32 mod) #ifdef Q_OS_WIN32 - if( hs.key2 != 0 /*|| ( mod == MOD_CONTROL && ( vk == VK_INSERT || vk == 'c' || vk == 'C' ) )*/ ) + if( hs.key2 != 0 || ( mod == MOD_CONTROL && ( vk == VK_INSERT || vk == 'c' || vk == 'C' ) ) ) { // Pass-through first part of compound hotkey or clipdoard copy command @@ -258,7 +258,7 @@ bool HotkeyWrapper::checkState(quint32 vk, quint32 mod) // Note that we only grab the clipboard key only if // the sequence didn't begin with it - if ( ( isCopyToClipboardKey( hs.key, hs.modifier ) && + if ( ( isCopyToClipboardKey( hs.key, hs.modifier ) || !isCopyToClipboardKey( hs.key2, hs.modifier ) ) && !isKeyGrabbed( hs.key2, hs.modifier ) ) keyToUngrab = grabKey( hs.key2, hs.modifier );