Beispiel #1
0
        private static void ActivateEvent(CommandType commandType, Keys key, int x, int y, bool wheelDirection, bool rightMouseButton)
        {
            //activate shortcuts
            if (commandType == CommandType.KeyDown)
            {
                foreach (Shortcut sc in m_shortcuts)
                {
                    bool shortcutKeysPressed = sc.Keys.Count > 0;
                    for (int i = 0; i < sc.Keys.Count && shortcutKeysPressed; i++)
                    {
                        shortcutKeysPressed = m_keysDown.Contains(sc.Keys[i]);
                    }
                    if (shortcutKeysPressed)
                    {
                        sc.TriggerShortcut();
                    }
                }
            }

            InputDetected?.Invoke(commandType, key, x, y, wheelDirection, rightMouseButton);
        }
 private void OnInputDetected(InputEvent eventType, IInput input)
 {
     InputDetected?.Invoke(new DrawingContextEventArgs(eventType, input));
 }