From 9ad1c6d835eac2938f1e6137dd420e274dcbef6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 7 Jul 2020 15:36:59 +0200 Subject: [PATCH] Rewrite AA_MacDontSwapCtrlAndMeta documentation Change-Id: Ifc41d0d341aed029e89baa3fc20f9535c1fb01d9 Reviewed-by: Volker Hilsheimer --- src/corelib/global/qnamespace.qdoc | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc index d6eabaec0c..ad663bc883 100644 --- a/src/corelib/global/qnamespace.qdoc +++ b/src/corelib/global/qnamespace.qdoc @@ -139,13 +139,24 @@ 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 On \macos by default, Qt swaps the - Control and Meta (Command) keys (i.e., whenever Control is pressed, Qt - sends Meta, and whenever Meta is pressed Control is sent). When this - attribute is true, Qt will not do the flip. \l QKeySequence::StandardKey - will also flip accordingly (i.e., QKeySequence::Copy will be - Command+C on the keyboard regardless of the value set, though what is output for - QKeySequence::toString() will be different). + \value AA_MacDontSwapCtrlAndMeta Keyboard shortcuts on \macos 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. + + When this attribute is true Qt will not do the remapping, and pressing + the Command modifier will result in Qt::MetaModifier, while pressing + the Control modifier will result in Qt::ControlModifier. + + Note that the \l QKeySequence::StandardKey sequences will always be + based on the same modifier (i.e., QKeySequence::Copy will be + Command+C regardless of the value set), but what is output for + QKeySequence::toString() will be different. \value AA_Use96Dpi Assume the screen has a resolution of 96 DPI rather than using the OS-provided resolution. This will cause font rendering