From a26a94b5bb0f8f872f9a2ee7a7c1b414cd2bbda4 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Thu, 21 Nov 2019 10:25:14 -0800 Subject: [PATCH] config: allow specifying NONE or "" for key modifiers previously, we would raise an error for these, which made it awkward to eg: bind just F1 to an action. --- src/config.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/config.rs b/src/config.rs index 8e04e8b1c..01f94cc90 100644 --- a/src/config.rs +++ b/src/config.rs @@ -368,6 +368,8 @@ where mods |= Modifiers::CTRL; } else if ele == "SUPER" || ele == "CMD" || ele == "WIN" { mods |= Modifiers::SUPER; + } else if ele == "NONE" || ele == "" { + mods |= Modifiers::NONE; } else { return Err(serde::de::Error::custom(format!( "invalid modifier name {} in {}",