|
@@ -3,6 +3,7 @@
|
|
|
#include <sstream>
|
|
#include <sstream>
|
|
|
#include <algorithm>
|
|
#include <algorithm>
|
|
|
#include <cctype>
|
|
#include <cctype>
|
|
|
|
|
+#include <iostream> // For std::cerr debugging
|
|
|
|
|
|
|
|
namespace lumacs {
|
|
namespace lumacs {
|
|
|
|
|
|
|
@@ -42,9 +43,18 @@ namespace {
|
|
|
if (s == "/") return BaseKey::Slash;
|
|
if (s == "/") return BaseKey::Slash;
|
|
|
if (s == "`") return BaseKey::Backtick;
|
|
if (s == "`") return BaseKey::Backtick;
|
|
|
if (s == "[") return BaseKey::LeftBracket;
|
|
if (s == "[") return BaseKey::LeftBracket;
|
|
|
- if (s == "\\") return BaseKey::Backslash; // Fixed escaping
|
|
|
|
|
|
|
+ if (s == "\\") return BaseKey::Backslash;
|
|
|
if (s == "]") return BaseKey::RightBracket;
|
|
if (s == "]") return BaseKey::RightBracket;
|
|
|
if (s == "'") return BaseKey::Quote;
|
|
if (s == "'") return BaseKey::Quote;
|
|
|
|
|
+
|
|
|
|
|
+ // Handle F-keys
|
|
|
|
|
+ if (s.length() > 1 && s[0] == 'F' && std::isdigit(s[1])) {
|
|
|
|
|
+ int f_num = std::stoi(s.substr(1));
|
|
|
|
|
+ if (f_num >= 1 && f_num <= 12) {
|
|
|
|
|
+ return static_cast<BaseKey>(static_cast<int>(BaseKey::F1) + (f_num - 1));
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
// Add more keys as needed
|
|
// Add more keys as needed
|
|
|
return BaseKey::Unknown;
|
|
return BaseKey::Unknown;
|
|
|
}
|
|
}
|