diff options
author | Norwegian Rock Cat <qt-info@nokia.com> | 2009-05-08 11:18:05 (GMT) |
---|---|---|
committer | Norwegian Rock Cat <qt-info@nokia.com> | 2009-05-11 15:31:32 (GMT) |
commit | 4af513212d9ca9ed88e18bddaabd90006aca8541 (patch) | |
tree | b060ec6e251f3b2580c4791b55af0bc255eb35e5 /src/corelib/global | |
parent | 66025048e22cda13ff0074b4bf26a898f7695e9e (diff) | |
download | Qt-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 'src/corelib/global')
-rw-r--r-- | src/corelib/global/qnamespace.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h index 4873b17..3367581 100644 --- a/src/corelib/global/qnamespace.h +++ b/src/corelib/global/qnamespace.h @@ -504,6 +504,7 @@ public: AA_DontCreateNativeWidgetSiblings = 4, AA_MacPluginApplication = 5, AA_DontUseNativeMenuBar = 6, + AA_MacDontSwapCtrlAndMeta = 7, // Add new attributes before this line AA_AttributeCount |