Merge pull request #1910 from eneshecan/master

This commit is contained in:
Alex 2022-12-27 15:44:42 +01:00 committed by GitHub
commit 21abd4f9f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

1
.gitignore vendored
View File

@ -2,6 +2,7 @@
*~
vgcore.*
/.vscode
/.idea
/.cache
*.swp
packagecache

View File

@ -49,9 +49,8 @@ auto Language::update() -> void {
void Language::onEvent(const std::string& ev) {
std::lock_guard<std::mutex> lg(mutex_);
auto layoutName = ev.substr(ev.find_last_of(',') + 1);
auto kbName = ev.substr(0, ev.find_last_of(','));
kbName = kbName.substr(kbName.find_first_of('>') + 2);
auto kbName = ev.substr(ev.find_last_of('>') + 1, ev.find_first_of(','));
auto layoutName = ev.substr(ev.find_first_of(',') + 1);
if (config_.isMember("keyboard-name") && kbName != config_["keyboard-name"].asString())
return; // ignore