diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2023-06-07 12:04:41 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2023-06-08 18:25:59 +0200 |
commit | f341f75c8c23c8e97752941d1f20948e71c6c284 (patch) | |
tree | e0807399a3e65f8b528a58a58af29278797e47c6 /src/corelib/global/qnamespace.qdoc | |
parent | 58ea69aaab62f31247dcd9b12f55de8fc001ea3a (diff) |
Align QKeySequence behavior between macOS and iOS
External keyboards for iOS/iPad devices have the same Macintosh based
keyboard as Macs have, with Command (or Cmd) ⌘; Option (or Alt) ⌥;
and Control (or Ctrl) ⌃ keys.
We were already declaring the QPlatformTheme::KeyboardScheme as
MacKeyboardScheme on iOS.
[ChangeLog][iOS] Keyboard shortcuts now follow the same scheme as on
macOS, with their native representation expressed via the ⌘, ⌥, and ⌃
modifiers. Use Qt::AA_MacDontSwapCtrlAndMeta to override this.
Pick-to: 6.6
Fixes: QTBUG-113165
Change-Id: Ia1856ee1718dab9f2f2512ffffc8b4d3cc5adecc
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/corelib/global/qnamespace.qdoc')
-rw-r--r-- | src/corelib/global/qnamespace.qdoc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc index 86ec1aee51..a43bf11226 100644 --- a/src/corelib/global/qnamespace.qdoc +++ b/src/corelib/global/qnamespace.qdoc @@ -120,15 +120,15 @@ set to true won't be used as a native menubar (e.g, the menubar at the top of the main screen on \macos). - \value AA_MacDontSwapCtrlAndMeta Keyboard shortcuts on \macos are typically + \value AA_MacDontSwapCtrlAndMeta Keyboard shortcuts on Apple platforms are typically based on the Command (or Cmd) keyboard modifier, represented by the ⌘ symbol. For example, the 'Copy' action is Command+C (⌘+C). To ease cross platform development Qt will by default remap Command to the Qt::ControlModifier, to align with other platforms. This allows creating keyboard shortcuts such as "Ctrl+J", which on \macos will then map to Command+J, as expected by \macos users. The - actual Control (or Ctrl) modifier on \macos, represented by ⌃, is - mapped to Qt::MetaModifier. + actual Control (or Ctrl) modifier on Apple platforms, represented by ⌃, + is mapped to Qt::MetaModifier. When this attribute is true Qt will not do the remapping, and pressing the Command modifier will result in Qt::MetaModifier, while pressing |