From 46c282bad5bbaef45584dd5dc56a6a413d263e41 Mon Sep 17 00:00:00 2001 From: Mohamad Moradi Date: Fri, 29 Apr 2022 04:59:29 +0430 Subject: [PATCH 1/2] Fix a bux regarding keybindings of X key --- src/KeybindManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/KeybindManager.cpp b/src/KeybindManager.cpp index 1602476..86fcf02 100644 --- a/src/KeybindManager.cpp +++ b/src/KeybindManager.cpp @@ -43,7 +43,7 @@ uint32_t KeybindManager::getKeyCodeFromName(std::string name) { } try { - returnValue = returnValue.substr(returnValue.find_last_of('x') + 1); + returnValue = returnValue.substr(returnValue.find_first_of('x') + 1); returnValue = returnValue.substr(0, returnValue.find_first_of(' ')); Debug::log(LOG, "queried for key " + name + " -> response keysym " + returnValue); @@ -74,7 +74,7 @@ uint32_t KeybindManager::getKeyCodeFromName(std::string name) { } try { - returnValue = returnValue.substr(returnValue.find_last_of('x') + 1); + returnValue = returnValue.substr(returnValue.find_first_of('x') + 1); returnValue = returnValue.substr(0, returnValue.find_first_of(' ')); Debug::log(LOG, "queried for key " + name + " -> response keysym " + returnValue); From 62a18053608292edda6552be5f5087ba345f7bd7 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Fri, 29 Apr 2022 21:39:48 +0200 Subject: [PATCH 2/2] fix ooga booga --- src/KeybindManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/KeybindManager.cpp b/src/KeybindManager.cpp index 86fcf02..39bc71a 100644 --- a/src/KeybindManager.cpp +++ b/src/KeybindManager.cpp @@ -43,7 +43,7 @@ uint32_t KeybindManager::getKeyCodeFromName(std::string name) { } try { - returnValue = returnValue.substr(returnValue.find_first_of('x') + 1); + returnValue = returnValue.substr(returnValue.find("0x") + 2); returnValue = returnValue.substr(0, returnValue.find_first_of(' ')); Debug::log(LOG, "queried for key " + name + " -> response keysym " + returnValue); @@ -74,7 +74,7 @@ uint32_t KeybindManager::getKeyCodeFromName(std::string name) { } try { - returnValue = returnValue.substr(returnValue.find_first_of('x') + 1); + returnValue = returnValue.substr(returnValue.find("0x") + 2); returnValue = returnValue.substr(0, returnValue.find_first_of(' ')); Debug::log(LOG, "queried for key " + name + " -> response keysym " + returnValue);