private static void KeyboardHookOnKeyPressed(object sender, KeyPressedEventArgs e) { Action action; if (_registeredHotKeys.TryGetValue(HotKey.FromKeyPressedEventArgs(e), out action)) { action.Invoke(); } }
private static void KeyboardHookOnKeyPressed(object sender, KeyPressedEventArgs e) { var hotKey = HotKey.FromKeyPressedEventArgs(e); if (RegisteredHotKeys.TryGetValue(hotKey, out var action)) { Log.Info($"[{hotKey}] pressed."); action.Invoke(); } }
private static void KeyboardHookOnKeyPressed(object sender, KeyPressedEventArgs e) { Action action; var hotKey = HotKey.FromKeyPressedEventArgs(e); if (RegisteredHotKeys.TryGetValue(hotKey, out action)) { Logger.WriteLine($"[{hotKey}] pressed.", "HotKeyManager"); action.Invoke(); } }