0835537c3c
On macOS, key combinations with the Return key do not get delivered through NSView::keyDown, but they are seen by the QCocoaNSMenu::menuHasKeyEquivalent override. We already use that override to check whether any menu item uses a matching shortcut, and give Qt's focus object a chance to override the shortcut. The key mapper used the NSNewlineCharacter '\n' for Qt::Key_Return. However, the character we get from macOS for the return key is the NSCarriageReturnCharacter character, '\r'. This makes the lookup fail, and shortcut overrides are not delivered for shortcuts using Qt::Key_Return. To fix this, map Qt::Key_Return to NSCarriageReturnCharacter. The inverse mapping maps both NSCarriageReturnCharacter and NSNewlineCharacter to Qt::Key_Return, and there are no other users of this function in Qt. Pick-to: 6.5 6.4 Fixes: QTBUG-107526 Change-Id: I716190adf3cd94697e2b3ad1afc25b95d8ebde25 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> |
||
---|---|---|
.github/workflows | ||
bin | ||
cmake | ||
coin | ||
config.tests | ||
dist | ||
doc | ||
examples | ||
lib | ||
libexec | ||
LICENSES | ||
mkspecs | ||
qmake | ||
src | ||
tests | ||
util | ||
.cmake.conf | ||
.gitattributes | ||
.gitignore | ||
.lgtm.yml | ||
.tag | ||
CMakeLists.txt | ||
conanfile.py | ||
config_help.txt | ||
configure | ||
configure.bat | ||
configure.cmake | ||
dependencies.yaml | ||
qt_cmdline.cmake | ||
sync.profile |