]> git.lyx.org Git - features.git/commitdiff
Cosmetic changes to how shortcuts are printed: S-C-S => C-S-s because S-S can be...
authorBo Peng <bpeng@lyx.org>
Tue, 30 Oct 2007 16:34:35 +0000 (16:34 +0000)
committerBo Peng <bpeng@lyx.org>
Tue, 30 Oct 2007 16:34:35 +0000 (16:34 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21296 a592a061-630c-0410-9148-cb99ea01b6c8

src/KeyMap.cpp
src/KeySequence.cpp
src/frontends/qt4/qlkey.h

index 3fbd46ede4c5c82f8657591df2c7920e9cde1a99..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;
index 727c49d636883ffe6bc61681d885af53ac714ce6..a2aac20519a5f1efccf62dbb5c946ec03e9bfd54 100644 (file)
@@ -143,12 +143,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;
index 9fb0290dc50bbaed35d073fd3d15f9b8736e27f1..35386b0c85315ba565b417fc0e8d7186512ed1be 100644 (file)
@@ -350,6 +350,44 @@ int string_to_qkey(std::string const & str)
 std::string const qkey_to_string(int lkey)
 {
        switch (lkey) {
+       case Qt::Key_0: return "0";
+       case Qt::Key_1: return "1";
+       case Qt::Key_2: return "2";
+       case Qt::Key_3: return "3";
+       case Qt::Key_4: return "4";
+       case Qt::Key_5: return "5";
+       case Qt::Key_6: return "6";
+       case Qt::Key_7: return "7";
+       case Qt::Key_8: return "8";
+       case Qt::Key_9: return "9";
+
+       case Qt::Key_A: return "a";
+       case Qt::Key_B: return "b";
+       case Qt::Key_C: return "c";
+       case Qt::Key_D: return "d";
+       case Qt::Key_E: return "e";
+       case Qt::Key_F: return "f";
+       case Qt::Key_G: return "g";
+       case Qt::Key_H: return "h";
+       case Qt::Key_I: return "i";
+       case Qt::Key_J: return "j";
+       case Qt::Key_K: return "k";
+       case Qt::Key_L: return "l";
+       case Qt::Key_M: return "m";
+       case Qt::Key_N: return "n";
+       case Qt::Key_O: return "o";
+       case Qt::Key_P: return "p";
+       case Qt::Key_Q: return "q";
+       case Qt::Key_R: return "r";
+       case Qt::Key_S: return "s";
+       case Qt::Key_T: return "t";
+       case Qt::Key_U: return "u";
+       case Qt::Key_V: return "v";
+       case Qt::Key_W: return "w";
+       case Qt::Key_X: return "x";
+       case Qt::Key_Y: return "y";
+       case Qt::Key_Z: return "z";
+
        case Qt::Key_Escape: return "Escape";
        case Qt::Key_Backspace: return "BackSpace";
        case Qt::Key_Insert: return "Insert";
@@ -505,43 +543,6 @@ std::string const qkey_to_string(int lkey)
        case Qt::Key_ssharp: return "ssharp";
        case Qt::Key_ydiaeresis: return "ydiaeresis";
 
-       case Qt::Key_A: return "A";
-       case Qt::Key_B: return "B";
-       case Qt::Key_C: return "C";
-       case Qt::Key_D: return "D";
-       case Qt::Key_E: return "E";
-       case Qt::Key_F: return "F";
-       case Qt::Key_G: return "G";
-       case Qt::Key_H: return "H";
-       case Qt::Key_I: return "I";
-       case Qt::Key_J: return "J";
-       case Qt::Key_K: return "K";
-       case Qt::Key_L: return "L";
-       case Qt::Key_M: return "M";
-       case Qt::Key_N: return "N";
-       case Qt::Key_O: return "O";
-       case Qt::Key_P: return "P";
-       case Qt::Key_Q: return "Q";
-       case Qt::Key_R: return "R";
-       case Qt::Key_S: return "S";
-       case Qt::Key_T: return "T";
-       case Qt::Key_U: return "U";
-       case Qt::Key_V: return "V";
-       case Qt::Key_W: return "W";
-       case Qt::Key_X: return "X";
-       case Qt::Key_Y: return "Y";
-       case Qt::Key_Z: return "Z";
-       case Qt::Key_0: return "0";
-       case Qt::Key_1: return "1";
-       case Qt::Key_2: return "2";
-       case Qt::Key_3: return "3";
-       case Qt::Key_4: return "4";
-       case Qt::Key_5: return "5";
-       case Qt::Key_6: return "6";
-       case Qt::Key_7: return "7";
-       case Qt::Key_8: return "8";
-       case Qt::Key_9: return "9";
-
        // FIXME: these ones I don't know the names of ... help !
        // what's here is basically guesses ...
        case Qt::Key_Super_L: return "Super_L";