mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-02 13:11:55 -07:00
unbind: add unbind all
This commit is contained in:
@@ -2578,6 +2578,13 @@ std::optional<std::string> CConfigManager::handleBind(const std::string& command
|
|||||||
std::optional<std::string> CConfigManager::handleUnbind(const std::string& command, const std::string& value) {
|
std::optional<std::string> CConfigManager::handleUnbind(const std::string& command, const std::string& value) {
|
||||||
const auto ARGS = CVarList(value);
|
const auto ARGS = CVarList(value);
|
||||||
|
|
||||||
|
if (ARGS.size() == 1 && ARGS[0] == "all") {
|
||||||
|
g_pKeybindManager->m_keybinds.clear();
|
||||||
|
g_pKeybindManager->m_activeKeybinds.clear();
|
||||||
|
g_pKeybindManager->m_lastLongPressKeybind.reset();
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
|
||||||
const auto MOD = g_pKeybindManager->stringToModMask(ARGS[0]);
|
const auto MOD = g_pKeybindManager->stringToModMask(ARGS[0]);
|
||||||
|
|
||||||
const auto KEY = parseKey(ARGS[1]);
|
const auto KEY = parseKey(ARGS[1]);
|
||||||
|
Reference in New Issue
Block a user