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>
This commit is contained in:
parent
9c99a13d9e
commit
0aea57dfc8
@ -352,7 +352,7 @@ QCocoaKeyMapper::~QCocoaKeyMapper()
|
|||||||
|
|
||||||
Qt::KeyboardModifiers QCocoaKeyMapper::queryKeyboardModifiers()
|
Qt::KeyboardModifiers QCocoaKeyMapper::queryKeyboardModifiers()
|
||||||
{
|
{
|
||||||
return qt_mac_get_modifiers(GetCurrentEventKeyModifiers());
|
return qt_mac_get_modifiers(GetCurrentKeyModifiers());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QCocoaKeyMapper::updateKeyboard()
|
bool QCocoaKeyMapper::updateKeyboard()
|
||||||
|
Loading…
Reference in New Issue
Block a user