Skip to content

Commit b7fca27

Browse files
authored
Merge pull request #172 from tig/BDisp-v2_vkeypacketsimulator-fix_3054
Fixes key handling for Windows.
2 parents c7bc119 + 198e261 commit b7fca27

29 files changed

+6669
-5701
lines changed

Terminal.Gui/Configuration/KeyJsonConverter.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ namespace Terminal.Gui;
88
/// Support for <see cref="Key"/> in JSON in the form of "Ctrl-X" or "Alt-Shift-F1".
99
/// </summary>
1010
public class KeyJsonConverter : JsonConverter<Key> {
11+
/// <inheritdoc />
1112
public override Key Read (ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => Key.TryParse (reader.GetString (), out var key) ? key : Key.Empty;
1213

14+
/// <inheritdoc />
1315
public override void Write (Utf8JsonWriter writer, Key value, JsonSerializerOptions options) => writer.WriteStringValue (value.ToString ());
1416
}

0 commit comments

Comments
 (0)