Exemplo n.º 1
0
        public static void removeKeyCombination(KeyCode[] keys)
        {
            bool repeat = false;

            for (int v = 0; v < registerdCombs.Count; v++)
            {
                KeyComObj obj = registerdCombs[v];
                if (keys.Length == obj.getList().Count)
                {
                    bool remove = true;
                    for (int i = 0; i < keys.Length; i++)
                    {
                        if (keys[i] != obj.getList()[i])
                        {
                            remove = false;
                            break;
                        }
                    }
                    if (remove)
                    {
                        repeat = true;
                        registerdCombs.Remove(obj);
                    }
                }
            }
            if (repeat)
            {
                removeKeyCombination(keys);
            }
        }