private bool AddKey(VirtualKeys virtualKey) { KeyPressed.Add(virtualKey); bool result = false; this.LogLine(" => Keyboard state : {0}", string.Join(",", KeyPressed.Select(x => x.ToEnumName()))); foreach (var registeredShortcut in RegisteredShortcuts.Values) { if (KeyPressedMatchShortcut(registeredShortcut.Shortcut)) { KeyUsed.Add(virtualKey); result = true; ExecuteRegisteredShortcut(registeredShortcut); } } return(result); }