Make bind modmask case-insensitive (#2714)

This commit is contained in:
Lennard Hofmann 2023-07-14 18:39:53 +02:00 committed by GitHub
parent b159634ef9
commit 06f5910365
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -102,6 +102,7 @@ void CKeybindManager::removeKeybind(uint32_t mod, const std::string& key) {
uint32_t CKeybindManager::stringToModMask(std::string mods) { uint32_t CKeybindManager::stringToModMask(std::string mods) {
uint32_t modMask = 0; uint32_t modMask = 0;
std::transform(mods.begin(), mods.end(), mods.begin(), ::toupper);
if (mods.contains("SHIFT")) if (mods.contains("SHIFT"))
modMask |= WLR_MODIFIER_SHIFT; modMask |= WLR_MODIFIER_SHIFT;
if (mods.contains("CAPS")) if (mods.contains("CAPS"))