diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-08-12 12:53:40 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-08-12 12:53:40 +0300 |
commit | 424ed0b25065cc5ecc4b8464db2581a03189ef60 (patch) | |
tree | 3e44b76cbd82dbf2e97d3307df4b91334dde6d55 /src | |
parent | e12c0ed00667c386ee57adfb2d076968ae63530d (diff) | |
download | plus-424ed0b25065cc5ecc4b8464db2581a03189ef60.tar.gz plus-424ed0b25065cc5ecc4b8464db2581a03189ef60.tar.bz2 plus-424ed0b25065cc5ecc4b8464db2581a03189ef60.tar.xz plus-424ed0b25065cc5ecc4b8464db2581a03189ef60.zip |
Shortening long key names in different windows.
Diffstat (limited to 'src')
-rw-r--r-- | src/keyboardconfig.cpp | 37 |
1 files changed, 34 insertions, 3 deletions
diff --git a/src/keyboardconfig.cpp b/src/keyboardconfig.cpp index 9c54926d4..d0c56ec1d 100644 --- a/src/keyboardconfig.cpp +++ b/src/keyboardconfig.cpp @@ -93,10 +93,41 @@ std::string KeyboardConfig::getKeyName(const int key) std::string KeyboardConfig::getKeyShortString(const std::string &key) { if (key == "backspace") - { return "bksp"; - } - else if (key == "unknown key") + else if (key == "numlock") + return "numlock"; + else if (key == "caps lock") + return "caplock"; + else if (key == "scroll lock") + return "scrlock"; + else if (key == "right shift") + return "rshift"; + else if (key == "left shift") + return "lshift"; + else if (key == "right ctrl") + return "rctrl"; + else if (key == "left ctrl") + return "lctrl"; + else if (key == "right alt") + return "ralt"; + else if (key == "left alt") + return "lalt"; + else if (key == "right meta") + return "rmeta"; + else if (key == "left meta") + return "lmeta"; + else if (key == "right super") + return "rsuper"; + else if (key == "left super") + return "lsuper"; + else if (key == "print screen") + return "print screen"; + else if (key == "page up") + return "pg up"; + else if (key == "page down") + return "pg down"; + + if (key == "unknown key") { // TRANSLATORS: Unknown key short string. // TRANSLATORS: This string must be maximum 5 chars |