Asteroids.Classes.KeyBindingsContent.RebindKBKey C# (CSharp) Method

RebindKBKey() private method

private RebindKBKey ( ) : void
return void
        private void RebindKBKey()
        {
            if (Keyboard.GetState().GetPressedKeys().Count() > 0)
            {
                string pressedKey = Keyboard.GetState().GetPressedKeys()[0].ToString();

                for (int i = 0; i < keyBindings.Length / 3; i++)
                {
                    if (keyBindings[i, 1] == pressedKey)
                        keyBindings[i, 1] = "[NOT BOUND]";
                }

                keyBindings[posY, posX + 1] = pressedKey;

                controlsEnabled = true;
            }
        }