Skip to content

Commit

Permalink
Clean up seperation of multikey and not multikey.
Browse files Browse the repository at this point in the history
  • Loading branch information
The-Briel-Deal committed May 13, 2024
1 parent 2ccfb7e commit d1b9541
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/config/ConfigManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1945,18 +1945,22 @@ std::optional<std::string> CConfigManager::handleBind(const std::string& command
std::set<xkb_keysym_t> KEYSYMS;
std::set<xkb_keysym_t> MODS;

uint32_t MOD;
std::string MODSTR;
std::string KEY;

if (multiKey) {
for (auto splitKey : CVarList(ARGS[1], 8, '&')) {
KEYSYMS.insert(xkb_keysym_from_name(splitKey.c_str(), XKB_KEYSYM_CASE_INSENSITIVE));
}
for (auto splitMod : CVarList(ARGS[0], 8, '&')) {
MODS.insert(xkb_keysym_from_name(splitMod.c_str(), XKB_KEYSYM_CASE_INSENSITIVE));
}
} else {
MOD = g_pKeybindManager->stringToModMask(ARGS[0]);
MODSTR = ARGS[0];
KEY = ARGS[1];
}
const auto MOD = g_pKeybindManager->stringToModMask(ARGS[0]);
const auto MODSTR = ARGS[0];

const auto KEY = multiKey ? "" : ARGS[1];

auto HANDLER = ARGS[2];

Expand Down

0 comments on commit d1b9541

Please sign in to comment.