diff --git a/src/gui/C4KeyboardInput.cpp b/src/gui/C4KeyboardInput.cpp index dd557e43b..4f0479070 100644 --- a/src/gui/C4KeyboardInput.cpp +++ b/src/gui/C4KeyboardInput.cpp @@ -238,8 +238,8 @@ static const std::unordered_map controllercodes = C4KeyCode C4KeyCodeEx::String2KeyCode(const StdStrBuf &sName) { - // direct key code? - if (sName.getLength() > 2) + // direct key code, e.g. "$e" (Backspace)? + if (sName.getLength() > 1) { unsigned int dwRVal; if (sscanf(sName.getData(), R"(\x%x)", &dwRVal) == 1) return dwRVal;