]> git.lyx.org Git - lyx.git/blobdiff - src/KeySequence.cpp
Fix the rest of bug 5010.
[lyx.git] / src / KeySequence.cpp
index 727c49d636883ffe6bc61681d885af53ac714ce6..576919bd16d29017166959d0ddc6d5c4020c5aea 100644 (file)
 #include <config.h>
 
 #include "KeySequence.h"
-
-#include "gettext.h"
 #include "KeyMap.h"
-#include "lfuns.h"
 
-#include "frontends/KeySymbol.h"
+#include "support/gettext.h"
 
-using std::make_pair;
-using std::string;
+#include "frontends/KeySymbol.h"
 
+using namespace std;
 
 namespace lyx {
 
@@ -40,9 +37,8 @@ FuncRequest const & KeySequence::addkey(KeySymbol const & key,
        modifiers.push_back(make_pair(mod, nmod));
        sequence.push_back(key);
 
-       if (curmap) {
+       if (curmap)
                return curmap->lookup(key, mod, this);
-       }
 
        static FuncRequest unknown(LFUN_UNKNOWN_ACTION);
        return unknown;
@@ -143,12 +139,12 @@ docstring const KeySequence::print(outputFormat format) const
                        break;
                case BindFile:
                        KeyModifier mod = modifiers[i].first;
-                       if (mod & ShiftModifier)
-                               buf += "S-";
                        if (mod & ControlModifier)
                                buf += "C-";
                        if (mod & AltModifier)
                                buf += "M-";
+                       if (mod & ShiftModifier)
+                               buf += "S-";
                
                        buf += from_utf8(sequence[i].getSymbolName());
                        break;