Fix log spam from invalid key modifiers (#2746)

This commit is contained in:
mezz authored and LexManos committed 2016-04-09 17:02:03 -07:00
1 parent 68cd48287b
commit c560af69a5
2 files changed
+17 -1

No files matched your search

@@ -120,6 +120,22 @@ public enum KeyModifier {
return false;
}
public static KeyModifier valueFromString(String stringValue)
{
try
{
return valueOf(stringValue);
}
catch (NullPointerException ignored)
{
return NONE;
}
catch (IllegalArgumentException ignored)
{
return NONE;
}
}
public abstract boolean matches(int keyCode);
public abstract boolean isActive();