mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-04 10:16:24 +02:00
* [KBM] Allow remapping keys and shortcuts to arbitrary unicode sequences * f: spelling * f: tests * f: split shortcut configuration * f: address ui layout comments * [BugReport]Don't report personal info * f: fix crash in KBME * f: add missed type button * f: fix shortcut line UI elements alignment * f: align elements size * f: add warning about non-mapped keys
38 lines
1.3 KiB
C#
38 lines
1.3 KiB
C#
// 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.
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text.Json.Serialization;
|
|
|
|
namespace Microsoft.PowerToys.Settings.UI.Library
|
|
{
|
|
public class AppSpecificKeysDataModel : KeysDataModel
|
|
{
|
|
[JsonPropertyName("targetApp")]
|
|
public string TargetApp { get; set; }
|
|
|
|
public new List<string> GetMappedOriginalKeys()
|
|
{
|
|
return base.GetMappedOriginalKeys();
|
|
}
|
|
|
|
public new List<string> GetMappedNewRemapKeys()
|
|
{
|
|
return base.GetMappedNewRemapKeys();
|
|
}
|
|
|
|
public bool Compare(AppSpecificKeysDataModel arg)
|
|
{
|
|
ArgumentNullException.ThrowIfNull(arg);
|
|
|
|
// Using Ordinal comparison for internal text
|
|
return string.Equals(OriginalKeys, arg.OriginalKeys, StringComparison.Ordinal) &&
|
|
string.Equals(NewRemapKeys, arg.NewRemapKeys, StringComparison.Ordinal) &&
|
|
string.Equals(NewRemapString, arg.NewRemapString, StringComparison.Ordinal) &&
|
|
string.Equals(TargetApp, arg.TargetApp, StringComparison.Ordinal);
|
|
}
|
|
}
|
|
}
|