]> git.lyx.org Git - features.git/blobdiff - src/KeyMap.cpp
Cosmetic changes to how shortcuts are printed: S-C-S => C-S-s because S-S can be...
[features.git] / src / KeyMap.cpp
index b32bda3e4b7df8c1869d7bc72edcd9e3be83dda9..dbfbb54b7d0d02b4cefc8980443db9e283ff1b63 100644 (file)
@@ -45,12 +45,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 +67,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 +84,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 +336,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 +371,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 +386,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 +415,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;