Opened 3 years ago
Closed 3 years ago
#7395 closed defect (nonchimerax)
Mismatch between Cocoa '\x0' and Carbon '\xd' for virtual key 36 with QFlags<Qt::KeyboardModifier>(NoModifier)
Reported by: | Tom Goddard | Owned by: | Tom Goddard |
---|---|---|---|
Priority: | moderate | Milestone: | |
Component: | Platform | Version: | |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Notify when closed: | Platform: | all | |
Project: | ChimeraX |
Description
Mac ARM ChimeraX is logging many warnings
Mismatch between Cocoa '\x0' and Carbon '\xd' for virtual key 36 with QFlags<Qt::KeyboardModifier>(NoModifier)
in ticket #7393.
Change History (7)
comment:1 by , 3 years ago
comment:2 by , 3 years ago
Virtual keys 1, 8, 9, 36, and 51 appear in the warning messages of #7393, corresponding to VK_LBUTTON, Backspace, Tab, Home, and 3 key in the qwindowskeymapper.cpp. These may not be the right mappings for Mac. Here are the Qt:Key_X values
https://doc.qt.io/qt-6/qt.html
I should probably just try typing lots of weird keys in an entry field. It may only happen on the ARM Mac ChimeraX so try in that.
comment:3 by , 3 years ago
In this sequence of warnings from ticket #7393 they seemed to try every combination of modifier keys
Mismatch between Cocoa '\x0' and Carbon '\xd' for virtual key 36 with QFlags<Qt::KeyboardModifier>(NoModifier) Mismatch between Cocoa '\x0' and Carbon '\xd' for virtual key 36 with QFlags<Qt::KeyboardModifier>(ShiftModifier) Mismatch between Cocoa '\x0' and Carbon '\xd' for virtual key 36 with QFlags<Qt::KeyboardModifier>(ControlModifier) Mismatch between Cocoa '\x0' and Carbon '\xd' for virtual key 36 with QFlags<Qt::KeyboardModifier>(ShiftModifier|ControlModifier) Mismatch between Cocoa '\x0' and Carbon '\xd' for virtual key 36 with QFlags<Qt::KeyboardModifier>(AltModifier) Mismatch between Cocoa '\x0' and Carbon '\xd' for virtual key 36 with QFlags<Qt::KeyboardModifier>(ShiftModifier|AltModifier) Mismatch between Cocoa '\x0' and Carbon '\xd' for virtual key 36 with QFlags<Qt::KeyboardModifier>(ControlModifier|AltModifier) Mismatch between Cocoa '\x0' and Carbon '\xd' for virtual key 36 with QFlags<Qt::KeyboardModifier>(ShiftModifier|ControlModifier|AltModifier) Mismatch between Cocoa '\x0' and Carbon '\xd' for virtual key 36 with QFlags<Qt::KeyboardModifier>(MetaModifier) Mismatch between Cocoa '\x0' and Carbon '\xd' for virtual key 36 with QFlags<Qt::KeyboardModifier>(ShiftModifier|MetaModifier) Mismatch between Cocoa '\x0' and Carbon '\xd' for virtual key 36 with QFlags<Qt::KeyboardModifier>(ControlModifier|MetaModifier) Mismatch between Cocoa '\x0' and Carbon '\xd' for virtual key 36 with QFlags<Qt::KeyboardModifier>(ShiftModifier|ControlModifier|MetaModifier) Mismatch between Cocoa '\x0' and Carbon '\xd' for virtual key 36 with QFlags<Qt::KeyboardModifier>(AltModifier|MetaModifier) Mismatch between Cocoa '\x0' and Carbon '\xd' for virtual key 36 with QFlags<Qt::KeyboardModifier>(ShiftModifier|AltModifier|MetaModifier) Mismatch between Cocoa '\x0' and Carbon '\xd' for virtual key 36 with QFlags<Qt::KeyboardModifier>(ControlModifier|AltModifier|MetaModifier) Mismatch between Cocoa '\x0' and Carbon '\xd' for virtual key 36 with QFlags<Qt::KeyboardModifier>(ShiftModifier|ControlModifier|AltModifier|MetaModifier)
comment:4 by , 3 years ago
Here is the source code that is issuing the warning.
https://code.woboq.org/qt6/qtbase/src/gui/platform/darwin/qapplekeymapper.mm.html#536
comment:5 by , 3 years ago
This bug also appears on Intel ChimeraX 1.4 on an Intel Mac, ticket #7397
comment:6 by , 3 years ago
This same warning was seen in April 2022 probably just after ChimeraX started using Qt 6.3.0, ticket #6710, and there are 6 tickets that contain the warning.
comment:7 by , 3 years ago
Resolution: | → nonchimerax |
---|---|
Status: | assigned → closed |
I tried pressing all manner of modifier keys and home, and other non alpha-numeric keys in command-line and help browser on M1 Mac and Intel Mac and never generated this warning. I guess the keys have to be typed to the right widget to get this error. Don't have any further ideas how to reproduce. In any case seems like a Qt bug.
This Qt bug report suggests this is probably caused by some modifier key press in a Qt text entry
https://bugreports.qt.io/browse/QTBUG-95471
It looks like virtual key 36 might be the HOME key looking at the Qt 5 windows key mapper source code.
https://code.woboq.org/qt5/qtbase/src/plugins/platforms/windows/qwindowskeymapper.cpp.html