What are QKeyEvent.nativeModifiers()? The documentation doesn't say much (https://doc.qt.io/qtforpython/PySide6/QtGui/QKeyEvent.html#PySide6.QtGui.PySide6.QtGui.QKeyEvent.nativeModifiers). From what I understand, the integer that is returned by calling this method on a QKeyEvent object represents the full state of the modifier keys (Ctrl, Shift, Alt, etc.).
Moreover, I would assume that the mapping between these integers and their respective modifier states is systematic, so is there a way to test whether a given modifier state contains a specific modifier (e.g. by using the "&" operator)?
Importantly, are the native modifiers cross-platform such that a Left Ctrl keypress on a PC returns the same integer as a Left Command on a Mac (since Qt.Key_Control corresponds to the MacOS command keys)?
As name suggests native modifiers has different values on mac and on pc. On windows value is a combination of WindowsNativeModifiers, on macOS it is a combination of NSEventModifierFlags, both translated to Qt::KeyboardModifiers
(windows macOS) which is same on both platforms.