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.
This commit is contained in:
Wez Furlong committed 2019-11-21 10:25:14 -08:00
1 parent ac028da1b6
commit a26a94b5bb
1 file changed
+2
+2
View File
@@ -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 {}",