From c2440d06d1a3bebed479f821b4816f20ce113692 Mon Sep 17 00:00:00 2001 From: Bo Peng Date: Tue, 30 Oct 2007 16:34:35 +0000 Subject: [PATCH] Cosmetic changes to how shortcuts are printed: S-C-S => C-S-s because S-S can be confusion, and Ctrl-Shift is more natural than Shift-Ctrl git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21296 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/KeyMap.cpp | 4 +-- src/KeySequence.cpp | 4 +-- src/frontends/qt4/qlkey.h | 75 ++++++++++++++++++++------------------- 3 files changed, 42 insertions(+), 41 deletions(-) diff --git a/src/KeyMap.cpp b/src/KeyMap.cpp index 3fbd46ede4..dbfbb54b7d 100644 --- a/src/KeyMap.cpp +++ b/src/KeyMap.cpp @@ -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; diff --git a/src/KeySequence.cpp b/src/KeySequence.cpp index 727c49d636..a2aac20519 100644 --- a/src/KeySequence.cpp +++ b/src/KeySequence.cpp @@ -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; diff --git a/src/frontends/qt4/qlkey.h b/src/frontends/qt4/qlkey.h index 9fb0290dc5..35386b0c85 100644 --- a/src/frontends/qt4/qlkey.h +++ b/src/frontends/qt4/qlkey.h @@ -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"; -- 2.39.2