Details
-
Bug
-
Resolution: Unresolved
-
P1: Critical
-
None
-
6.7.3, 6.8.3, 6.8, 6.9.0 RC
-
Qt 6.8.2. Sonoma 14.7.4.
Description
When I connect shortcuts Qt::Meta | Qt::Key_(A-Z), only Cmd + A works as expected, Cmd + H & Q did mac's hide and quit respectively. Everything else did nothing. But if I pressed Shift + Cmd + Letter my shortcut would fire.
Also, if I change my shortcuts to Qt::SHIFT | Qt::META | Qt::Key_(A-Z), again only A works as expected and a couple have mac default behaviors. But the rest I could not find a set of keys that would trigger my shortcut.
To demonstrate this, I created a MainWindow that connects each Cmd + Letter key sequence to a dialog that prints the key sequence. I tested both Qt::META | Qt::Key_(Letter) and tr("Meta+Letter"). I also tested with both an apple and normal (ascii) (US) keyboard.
I.E.
app.setAttribute(Qt::AA_MacDontSwapCtrlAndMeta);
QShortcut* pShortcut = new QShortcut(Qt::Meta | Qt::Key_B, pParent);
connect(pShortcut, &QShortcut::activated, pParent, &pParent::ShowBDialog);
This appears to have started when we switched from building with Qt 6.5.7 to Qt 6.8.0, but all my testing was done against Qt 6.8.2.
Attachments
Gerrit Reviews
For Gerrit Dashboard: QTBUG-133963 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
636396,1 | Account for Qt::AA_MacDontSwapCtrlAndMeta when mapping Latin ⌘-shortcuts | dev | qt/qtbase | Status: NEW | +2 | 0 |