public static string?GetKey(Key key) { if (Keymap.TryGetValue(key, out string?value)) { return(value); } else { throw new NotSupportedException($"Unsupported key: \"{key}\""); } }
private static void MapKey(StringBuilder builder, Key key) { if (Keymap.TryGetValue(key, out string?value)) { builder.Append(value); } else { throw new NotSupportedException($"Unsupported modifier key: \"{key}\""); } }
private static Keys MapKey(Key key) { if (Keymap.TryGetValue(key, out Keys value)) { return(value); } else { throw new NotSupportedException($"Unsupported modifier key: \"{key}\""); } }