Example #1
0
        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]}");
        }
Example #2
0
 public bool HasSameInput(HotkeyInputItem hotkeyItem)
 {
     return(hotkeyItem.key == key && hotkeyItem.modifier == modifier);
 }