public static bool IsTriggeringShortCut(Event current, string key1, KeyCode defaultKey1)
        {
            if (current == null)
            {
                return(false);
            }

            KeyCode keycode = ExtShortCutEditor.GetKey(key1, (int)defaultKey1);

            return(current.keyCode == keycode);
        }
        public static bool IsTriggeringShortCut1Modifier1Keys(Event current,
                                                              string modifierKey, ModifierKey modifierDefaultKey,
                                                              string key, KeyCode defaultKey)
        {
            if (current == null)
            {
                return(false);
            }

            ModifierKey modifier = ExtShortCutEditor.GetModifierKey(modifierKey, (int)modifierDefaultKey);
            KeyCode     keycode  = ExtShortCutEditor.GetKey(key, (int)defaultKey);

            return(ExtShortCutEditor.IsModifierEnumMatch(current, modifier) && current.keyCode == keycode);
        }
        public static void IsTriggeringShortCut1Modifier2Keys(Event current,
                                                              out bool firstKey, out bool secondKey,

                                                              string modifierKey, ModifierKey modifierDefaultKey,
                                                              string key1, KeyCode defaultKey1,
                                                              string key2, KeyCode defaultKey2)
        {
            if (current == null)
            {
                firstKey  = false;
                secondKey = false;
                return;
            }

            ModifierKey modifier      = ExtShortCutEditor.GetModifierKey(modifierKey, (int)modifierDefaultKey);
            KeyCode     firstKeyCode  = ExtShortCutEditor.GetKey(key1, (int)defaultKey1);
            KeyCode     secondKeyCode = ExtShortCutEditor.GetKey(key2, (int)defaultKey2);

            firstKey  = ExtShortCutEditor.IsModifierEnumMatch(current, modifier) && current.keyCode == firstKeyCode;
            secondKey = ExtShortCutEditor.IsModifierEnumMatch(current, modifier) && current.keyCode == secondKeyCode;
        }
        public static bool IsTriggeringShortCut2Modifier1Keys(Event current,
                                                              string modifierKey1, ModifierKey modifierDefaultKey1,
                                                              string modifierKey2, ModifierKey modifierDefaultKey2,
                                                              string key1, KeyCode defaultKey1)
        {
            if (current == null)
            {
                return(false);
            }

            ModifierKey modifier1 = ExtShortCutEditor.GetModifierKey(modifierKey1, (int)modifierDefaultKey1);
            ModifierKey modifier2 = ExtShortCutEditor.GetModifierKey(modifierKey2, (int)modifierDefaultKey2);
            KeyCode     keycode   = ExtShortCutEditor.GetKey(key1, (int)defaultKey1);

            bool modifierMatch1 = ExtShortCutEditor.IsModifierEnumMatch(current, modifier1);
            bool modifierMatch2 = ExtShortCutEditor.IsModifierEnumMatch(current, modifier2);

            bool manageOneNone = (!modifierMatch1 && modifier1 == ModifierKey.NONE && modifierMatch2) ||
                                 (!modifierMatch2 && modifier2 == ModifierKey.NONE && modifierMatch1);

            bool modifierOk = manageOneNone || (modifierMatch1 && modifierMatch2);

            return(modifierOk && current.keyCode == keycode);
        }