Calculate the Cyclomatic Complexity

public override void UpdateInput()
{
KeyboardState currentState = Keyboard.GetState(PlayerIndex.One);

Keys [] keysPressed = currentState.GetPressedKeys();
foreach (Keys key in keysPressed)
if (!previousKeyboardState.IsKeyDown(key))
if (commands.ContainsKey((int)key))
commands[(int)key].Execute();

previousKeyboardState = currentState;
}