From 15576c961047231a49afda9b9ee0159ba132c0ae Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Fri, 4 Dec 2020 15:04:49 +0100 Subject: iOS: Handle keyboard events when using an external keyboard MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This enables the two possible approaches for handling external keyboard events. While support still exists for before 13.4 then both approaches are needed. This ensures that all external keyboard events are handled as key events and passed on accordingly. Additionally, this accounts for possible shortcuts too, therefore a new function is added to QShortcutMap to aid that. As a result, code has now moved from QCocoaKeyMapper to be part of the gui/platforms/darwin part to make it easier to reuse this code elsewhere. Fixes: QTBUG-85727 Change-Id: I349af43468b03fd8dcb16adba02669974affe154 Reviewed-by: Qt CI Bot Reviewed-by: Tor Arne Vestbø --- src/plugins/platforms/cocoa/qcocoaintegration.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/plugins/platforms/cocoa/qcocoaintegration.h') diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.h b/src/plugins/platforms/cocoa/qcocoaintegration.h index 4f1969dd98..caf47e38d3 100644 --- a/src/plugins/platforms/cocoa/qcocoaintegration.h +++ b/src/plugins/platforms/cocoa/qcocoaintegration.h @@ -48,7 +48,6 @@ #include "qcocoaclipboard.h" #include "qcocoadrag.h" #include "qcocoaservices.h" -#include "qcocoakeymapper.h" #if QT_CONFIG(vulkan) #include "qcocoavulkaninstance.h" #endif @@ -57,6 +56,7 @@ #include #include #include +#include Q_FORWARD_DECLARE_OBJC_CLASS(NSToolbar); @@ -156,7 +156,7 @@ private: QScopedPointer mCocoaDrag; QScopedPointer mNativeInterface; QScopedPointer mServices; - QScopedPointer mKeyboardMapper; + QScopedPointer mKeyboardMapper; #if QT_CONFIG(vulkan) mutable QCocoaVulkanInstance *mCocoaVulkanInstance = nullptr; -- cgit v1.2.3