summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorNorwegian Rock Cat <qt-info@nokia.com>2009-05-08 11:18:05 (GMT)
committerNorwegian Rock Cat <qt-info@nokia.com>2009-05-11 15:31:32 (GMT)
commit4af513212d9ca9ed88e18bddaabd90006aca8541 (patch)
treeb060ec6e251f3b2580c4791b55af0bc255eb35e5 /doc
parent66025048e22cda13ff0074b4bf26a898f7695e9e (diff)
downloadQt-4af513212d9ca9ed88e18bddaabd90006aca8541.zip
Qt-4af513212d9ca9ed88e18bddaabd90006aca8541.tar.gz
Qt-4af513212d9ca9ed88e18bddaabd90006aca8541.tar.bz2
Add a AA_MacDontSwapCtrlAndMeta application attribute.
This is to help undo the some magic that is in the Qt/Mac port. Qt automatically flips the Meta and Control keys on Mac. This is a "feature" that makes porting older programs that don't use standard shortcuts easier as Ctrl and Command usually map to the same shortcuts in the application. The upshot of this is that I need to strip the text() out of key events if they contain the Control or Meta modifier. This causes much headache for anyone writing a terminal emulator. Though they would still have to write special code because the keys are swapped anyway. This allows people to write the terminal emulator where hitting the Control key will really send a Control key modifier. We've also done the extra work to ensure that standard shortcuts work correctly regardless of what the value of the attribute is. That is, if you specify QKeySequence::Cut for a shortcut you can always hit Command+X and things will work.
Diffstat (limited to 'doc')
-rw-r--r--doc/src/qnamespace.qdoc8
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/src/qnamespace.qdoc b/doc/src/qnamespace.qdoc
index ad59b8d..fc4310b 100644
--- a/doc/src/qnamespace.qdoc
+++ b/doc/src/qnamespace.qdoc
@@ -157,6 +157,14 @@
set to true won't be used as a native menubar (e.g, the menubar at
the top of the main screen on Mac OS X or at the bottom in Windows CE).
+ \value AA_MacDontSwapCtrlAndMeta On Mac OS X 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. QKeySequence::StandardShortcuts
+ 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(QKeySequence::PortableText) will be different).
+
\omitvalue AA_AttributeCount
*/