2020-08-17 10:00:56 -07:00
|
|
|
|
// Copyright (c) Microsoft Corporation
|
|
|
|
|
|
// The Microsoft Corporation licenses this file to you under the MIT license.
|
|
|
|
|
|
// See the LICENSE file in the project root for more information.
|
|
|
|
|
|
|
2020-09-23 13:20:32 -07:00
|
|
|
|
using System.Text.Json;
|
2020-08-17 10:00:56 -07:00
|
|
|
|
using System.Text.Json.Serialization;
|
2020-10-22 09:45:48 -07:00
|
|
|
|
using Microsoft.PowerToys.Settings.UI.Library.Interfaces;
|
2020-08-17 10:00:56 -07:00
|
|
|
|
|
2020-10-22 09:45:48 -07:00
|
|
|
|
namespace Microsoft.PowerToys.Settings.UI.Library
|
2020-08-17 10:00:56 -07:00
|
|
|
|
{
|
2020-09-23 13:20:32 -07:00
|
|
|
|
public class KeyboardManagerProfile : ISettingsConfig
|
2020-08-17 10:00:56 -07:00
|
|
|
|
{
|
|
|
|
|
|
[JsonPropertyName("remapKeys")]
|
|
|
|
|
|
public RemapKeysDataModel RemapKeys { get; set; }
|
|
|
|
|
|
|
2023-11-23 11:46:07 +01:00
|
|
|
|
[JsonPropertyName("remapKeysToText")]
|
|
|
|
|
|
public RemapKeysDataModel RemapKeysToText { get; set; }
|
|
|
|
|
|
|
2020-08-17 10:00:56 -07:00
|
|
|
|
[JsonPropertyName("remapShortcuts")]
|
|
|
|
|
|
public ShortcutsKeyDataModel RemapShortcuts { get; set; }
|
|
|
|
|
|
|
2023-11-23 11:46:07 +01:00
|
|
|
|
[JsonPropertyName("remapShortcutsToText")]
|
|
|
|
|
|
public ShortcutsKeyDataModel RemapShortcutsToText { get; set; }
|
|
|
|
|
|
|
2020-08-17 10:00:56 -07:00
|
|
|
|
public KeyboardManagerProfile()
|
|
|
|
|
|
{
|
|
|
|
|
|
RemapKeys = new RemapKeysDataModel();
|
2023-11-23 11:46:07 +01:00
|
|
|
|
RemapKeysToText = new RemapKeysDataModel();
|
|
|
|
|
|
|
2020-08-17 10:00:56 -07:00
|
|
|
|
RemapShortcuts = new ShortcutsKeyDataModel();
|
2023-11-23 11:46:07 +01:00
|
|
|
|
RemapShortcutsToText = new ShortcutsKeyDataModel();
|
2020-08-17 10:00:56 -07:00
|
|
|
|
}
|
2020-09-23 13:20:32 -07:00
|
|
|
|
|
|
|
|
|
|
public string ToJsonString()
|
|
|
|
|
|
{
|
|
|
|
|
|
return JsonSerializer.Serialize(this);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public string GetModuleName()
|
|
|
|
|
|
{
|
|
|
|
|
|
return KeyboardManagerSettings.ModuleName;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// This can be utilized in the future if the default.json file is to be modified/deleted.
|
|
|
|
|
|
public bool UpgradeSettingsConfiguration()
|
|
|
|
|
|
{
|
|
|
|
|
|
return false;
|
|
|
|
|
|
}
|
2020-08-17 10:00:56 -07:00
|
|
|
|
}
|
|
|
|
|
|
}
|