Exemple #1
0
 public static string?GetKey(Key key)
 {
     if (Keymap.TryGetValue(key, out string?value))
     {
         return(value);
     }
     else
     {
         throw new NotSupportedException($"Unsupported key: \"{key}\"");
     }
 }
Exemple #2
0
 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}\"");
     }
 }
Exemple #3
0
 private static Keys MapKey(Key key)
 {
     if (Keymap.TryGetValue(key, out Keys value))
     {
         return(value);
     }
     else
     {
         throw new NotSupportedException($"Unsupported modifier key: \"{key}\"");
     }
 }