From 384dcfbc3687d6fc03002e297e9fb6898f64fee6 Mon Sep 17 00:00:00 2001 From: shenleban tongying Date: Tue, 12 Nov 2024 06:59:25 -0500 Subject: [PATCH] proper typing of char16_t --- src/macos/machotkeywrapper.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/macos/machotkeywrapper.mm b/src/macos/machotkeywrapper.mm index 5e169f04..8752c138 100644 --- a/src/macos/machotkeywrapper.mm +++ b/src/macos/machotkeywrapper.mm @@ -81,7 +81,7 @@ void createMapping() } } -quint32 qtKeyToNativeKey(quint32 key) +quint32 qtKeyToNativeKey(UniChar key) { createMapping(); if (mapping.empty()) { @@ -341,7 +341,7 @@ quint32 HotkeyWrapper::nativeKey(int key) return 0x72; default:; } - return MacKeyMapping::qtKeyToNativeKey(QChar(key).toLower().toLatin1()); + return MacKeyMapping::qtKeyToNativeKey(QChar(key).toLower().unicode()); } void HotkeyWrapper::sendCmdC()