2020-08-18 01:00:56 +08: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-24 04:20:32 +08:00
|
|
|
|
using System.Text.Json;
|
2020-08-18 01:00:56 +08:00
|
|
|
|
using System.Text.Json.Serialization;
|
2020-10-23 00:45:48 +08:00
|
|
|
|
using Microsoft.PowerToys.Settings.UI.Library.Interfaces;
|
2020-08-18 01:00:56 +08:00
|
|
|
|
|
2020-10-23 00:45:48 +08:00
|
|
|
|
namespace Microsoft.PowerToys.Settings.UI.Library
|
2020-08-18 01:00:56 +08:00
|
|
|
|
{
|
2020-09-24 04:20:32 +08:00
|
|
|
|
public class KeyboardManagerProfile : ISettingsConfig
|
2020-08-18 01:00:56 +08:00
|
|
|
|
{
|
|
|
|
|
[JsonPropertyName("remapKeys")]
|
|
|
|
|
public RemapKeysDataModel RemapKeys { get; set; }
|
|
|
|
|
|
|
|
|
|
[JsonPropertyName("remapShortcuts")]
|
|
|
|
|
public ShortcutsKeyDataModel RemapShortcuts { get; set; }
|
|
|
|
|
|
|
|
|
|
public KeyboardManagerProfile()
|
|
|
|
|
{
|
|
|
|
|
RemapKeys = new RemapKeysDataModel();
|
|
|
|
|
RemapShortcuts = new ShortcutsKeyDataModel();
|
|
|
|
|
}
|
2020-09-24 04:20:32 +08: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-18 01:00:56 +08:00
|
|
|
|
}
|
|
|
|
|
}
|