]> git.lyx.org Git - features.git/commitdiff
#7292 use MetaModifier for AltModifier on mac - alt is used to reach many special...
authorStephan Witt <switt@lyx.org>
Mon, 14 Feb 2011 19:41:23 +0000 (19:41 +0000)
committerStephan Witt <switt@lyx.org>
Mon, 14 Feb 2011 19:41:23 +0000 (19:41 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37659 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiKeySymbol.cpp

index 1a945c08a6dc740c6b144dc9be668e73ced9a701..870d269d520156acb491c3b05300da014f10d1f5 100644 (file)
@@ -691,8 +691,13 @@ docstring const KeySymbol::print(KeyModifier mod, bool forgui) const
                tmpkey += Qt::ShiftModifier;
        if (mod & ControlModifier)
                tmpkey += Qt::ControlModifier;
+#ifdef Q_WS_MACX
+       if (mod & AltModifier)
+               tmpkey += Qt::MetaModifier;
+#else
        if (mod & AltModifier)
                tmpkey += Qt::AltModifier;
+#endif
 
        QKeySequence seq(tmpkey);
        QString str;
@@ -744,8 +749,13 @@ KeyModifier q_key_state(Qt::KeyboardModifiers state)
                k |= ControlModifier;
        if (state & Qt::ShiftModifier)
                k |= ShiftModifier;
+#ifdef Q_WS_MACX
+       if (state & Qt::MetaModifier)
+               k |= AltModifier;
+#else
        if (state & Qt::AltModifier || state & Qt::MetaModifier)
                k |= AltModifier;
+#endif
        return k;
 }