public static string Localize(HotkeyInputItem hotkeyInput) { if (hotkeyInput.KeyCode == KeyCode.None) { return(string.Empty); } string result = string.Empty; if (hotkeyInput.Modifier != HotkeyModifier.None) { result = $"{StringsByHotkeyModifier[hotkeyInput.Modifier]}-"; } return($"{result}{StringsByKeyCode[hotkeyInput.KeyCode]}"); }
public bool HasSameInput(HotkeyInputItem hotkeyItem) { return(hotkeyItem.key == key && hotkeyItem.modifier == modifier); }