<div dir="ltr"><div><div><div><div><div>In upgrading an app from Qt4 to Qt5 I have found what appears to be an  incompatibility between releases on Mac OS X.<br><br></div>The app intercepts keystrokes using a keyPressEvent method. In Qt4, when the user presses the Mac keys Option and 3, the keyEvent contains a modifier of Qt.Alt_Modifier and a key of Qt.Key_3 (0x33)<br>

<br></div>In Qt5, the modifier is the same, but the key is Qt.Key_sterling (0xa3). Other Option-keys deliver, not the physical key code, but the special characters shown in the Mac OS Keyboard Viewer widget. For example Option-7 delivers Qt.Key_paragraph instead of Key_7.<br>

<br></div>This could be seen as a feature for the Mac user, but it is a sharp incompatibility between releases, and between platforms. It is not mentioned in the PyQt5 diffs [1] or in the Qt5 transition doc [2]. I've looked through the docs for QCoreApplication, QGuiApplication and QApplication hoping for some kind of switch but don't see it.<br>

<br> I think this is probably in Qt5, but thought I'd ask if it could possibly lie in PyQt5, or be circumvented in PyQt5.<br><br></div>Thanks for your attention,<br><br></div>Dave Cortesi<br><br>[1] <a href="http://pyqt.sourceforge.net/Docs/PyQt5/pyqt4_differences.html">http://pyqt.sourceforge.net/Docs/PyQt5/pyqt4_differences.html</a><br>

[2] <a href="http://qt-project.org/wiki/Transition_from_Qt_4.x_to_Qt5">http://qt-project.org/wiki/Transition_from_Qt_4.x_to_Qt5</a><br></div>