示例#1
0
        private static void KeyboardHookOnKeyPressed(object sender, KeyPressedEventArgs e)
        {
            Action action;

            if (_registeredHotKeys.TryGetValue(HotKey.FromKeyPressedEventArgs(e), out action))
            {
                action.Invoke();
            }
        }
示例#2
0
        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();
            }
        }
示例#3
0
        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();
            }
        }