]> git.lyx.org Git - lyx.git/blobdiff - src/KeySequence.cpp
Painter::wavyHorizontalLine(): new method for inline spellcheck purpose.
[lyx.git] / src / KeySequence.cpp
index a2aac20519a5f1efccf62dbb5c946ec03e9bfd54..734371e0b742a1b5e13857817c5465566c85eb28 100644 (file)
@@ -3,7 +3,7 @@
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
- * \author Lars Gullik Bjønnes
+ * \author Lars Gullik Bjønnes
  * \author Jean-Marc Lasgouttes
  * \author John Levon
  *
 #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,12 +37,10 @@ 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;
+       return FuncRequest::unknown;
 }
 
 
@@ -194,4 +189,13 @@ void KeySequence::clear()
 }
 
 
+void KeySequence::removeKey()
+{
+       if (deleted_)
+               return;
+       sequence.pop_back();
+       modifiers.pop_back();
+}
+
+
 } // namespace lyx