]> git.lyx.org Git - lyx.git/blobdiff - src/KeyMap.cpp
* src/LyXRC.{cpp,h}:
[lyx.git] / src / KeyMap.cpp
index b32bda3e4b7df8c1869d7bc72edcd9e3be83dda9..04a3bbcb338c4a615a81859b1565beb17a899023 100644 (file)
@@ -20,6 +20,7 @@
 #include "LyXAction.h"
 #include "Lexer.h"
 
+#include "support/docstream.h"
 #include "support/filetools.h"
 
 #include <fstream>
@@ -45,12 +46,12 @@ string const KeyMap::printKeySym(KeySymbol const & key, KeyModifier mod)
 
        string const s = key.getSymbolName();
 
-       if (mod & ShiftModifier)
-               buf += "S-";
        if (mod & ControlModifier)
                buf += "C-";
        if (mod & AltModifier)
                buf += "M-";
+       if (mod & ShiftModifier)
+               buf += "S-";
 
        buf += s;
        return buf;
@@ -67,7 +68,7 @@ size_t KeyMap::bind(string const & seq, FuncRequest const & func)
 
        string::size_type const res = k.parse(seq);
        if (res == string::npos) {
-               defkey(&k, func);
+               bind(&k, func);
        } else {
                LYXERR(Debug::KBMAP) << "Parse error at position " << res
                                     << " in key sequence '" << seq << "'."
@@ -84,7 +85,7 @@ size_t KeyMap::unbind(string const & seq, FuncRequest const & func)
 
        string::size_type const res = k.parse(seq);
        if (res == string::npos)
-               delkey(&k, func);
+               unbind(&k, func);
        else
                LYXERR(Debug::KBMAP) << "Parse error at position " << res
                                     << " in key sequence '" << seq << "'."
@@ -336,7 +337,7 @@ docstring const KeyMap::print(bool forgui) const
 }
 
 
-void KeyMap::defkey(KeySequence * seq, FuncRequest const & func, unsigned int r)
+void KeyMap::bind(KeySequence * seq, FuncRequest const & func, unsigned int r)
 {
        KeySymbol code = seq->sequence[r];
        if (!code.isOK())
@@ -371,7 +372,7 @@ void KeyMap::defkey(KeySequence * seq, FuncRequest const & func, unsigned int r)
                                               << endl;
                                return;
                        } else {
-                               it->table->defkey(seq, func, r + 1);
+                               it->table->bind(seq, func, r + 1);
                                return;
                        }
                }
@@ -386,12 +387,12 @@ void KeyMap::defkey(KeySequence * seq, FuncRequest const & func, unsigned int r)
                newone->table.reset();
        } else {
                newone->table.reset(new KeyMap);
-               newone->table->defkey(seq, func, r + 1);
+               newone->table->bind(seq, func, r + 1);
        }
 }
 
 
-void KeyMap::delkey(KeySequence * seq, FuncRequest const & func, unsigned int r)
+void KeyMap::unbind(KeySequence * seq, FuncRequest const & func, unsigned int r)
 {
        KeySymbol code = seq->sequence[r];
        if (!code.isOK())
@@ -415,7 +416,7 @@ void KeyMap::delkey(KeySequence * seq, FuncRequest const & func, unsigned int r)
                                                it->table.reset();
                                        }
                        } else if (it->table.get()) {
-                               it->table->delkey(seq, func, r + 1);
+                               it->table->unbind(seq, func, r + 1);
                                if (it->table->empty())
                                        remove = it;
                                return;