private void hotkeyForm_HotkeyPress(ushort id, Keys key, Modifiers modifier) { if (!IgnoreHotkeys) { HotkeySettings hotkeySetting = Hotkeys.Find(x => x.HotkeyInfo.ID == id); if (hotkeySetting != null) { OnHotkeyTrigger(hotkeySetting); } } }
private void hotkeyForm_HotkeyPress(ushort id, Keys key, Modifiers modifier) { if (!IgnoreHotkeys && (!Program.Settings.DisableHotkeysOnFullscreen || !CaptureHelpers.IsActiveWindowFullscreen())) { HotkeySettings hotkeySetting = Hotkeys.Find(x => x.HotkeyInfo.ID == id); if (hotkeySetting != null) { OnHotkeyTrigger(hotkeySetting); } } }
// Updates hotkeys as they have been modified public void UpdateHotkeys() { List <string> hotkeysToUpdate = new List <string>(); foreach (KeyValuePair <string, bool> pair in ModifiedHotkeys.ToList()) { if (pair.Value == true) { hotkeysToUpdate.Add(pair.Key); ModifiedHotkeys[pair.Key] = false; } } foreach (string name in hotkeysToUpdate) { Hotkey hotkey = Hotkeys.Find(item => item.Name == name); if (Groups.TryGetValue(hotkey.Group, out XMLHotkeyGroup group)) { hotkey.Binding = group.GetBinding(name); } } }