summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNils Jeisecke <nils.jeisecke@saltation.com>2018-07-12 18:49:41 +0200
committerTimur Pocheptsov <timur.pocheptsov@qt.io>2018-07-20 13:48:38 +0000
commit0aea57dfc8e24262015ad1194b70302deb1afd21 (patch)
treeddaf18d47eb0c078639fd2ab4d12c227b5b69d51 /src
parent9c99a13d9e72824b4d6cf71d56893f7d96bf8498 (diff)
Fix QGuiApplication::queryKeyboardModifiers() on macOS
To quote the documentation: Queries and returns the state of the modifier keys on the keyboard. Unlike keyboardModifiers, this method returns the actual keys held on the input device at the time of calling the method. So GetCurrentKeyModifiers seems to be the correct Carbon function to use. [ChangeLog][QtGui][QGuiApplication] Fix queryKeyboardModifiers() on macOS to actually return the current modifier key state Change-Id: I11f2ef1897a39aea13df4afbfebb8172ca803a30 Task-number: QTBUG-26413 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/cocoa/qcocoakeymapper.mm2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoakeymapper.mm b/src/plugins/platforms/cocoa/qcocoakeymapper.mm
index 5408178824..5e279a400b 100644
--- a/src/plugins/platforms/cocoa/qcocoakeymapper.mm
+++ b/src/plugins/platforms/cocoa/qcocoakeymapper.mm
@@ -352,7 +352,7 @@ QCocoaKeyMapper::~QCocoaKeyMapper()
Qt::KeyboardModifiers QCocoaKeyMapper::queryKeyboardModifiers()
{
- return qt_mac_get_modifiers(GetCurrentEventKeyModifiers());
+ return qt_mac_get_modifiers(GetCurrentKeyModifiers());
}
bool QCocoaKeyMapper::updateKeyboard()