diff --git a/src/driver/rcinput.cpp b/src/driver/rcinput.cpp index abc4595a6..0554597ce 100644 --- a/src/driver/rcinput.cpp +++ b/src/driver/rcinput.cpp @@ -1678,9 +1678,14 @@ const char * CRCInput::getSpecialKeyName(const unsigned int key) std::string CRCInput::getKeyName(const unsigned int key) { - std::string res(getKeyNameC(key & ~RC_Repeat)); - if ((key & RC_Repeat) && res != "unknown") - res += " (long)"; + std::string res; + if (key > RC_MaxRC) + res = getKeyNameC(key); /* will only resolve RC_nokey or "unknown" */ + else { + res = (getKeyNameC(key & ~RC_Repeat)); + if ((key & RC_Repeat) && res != "unknown") + res += " (long)"; + } return res; }