So now that our state variable contains the current state of the keyboard, let's look at how we could use it. To determine whether a key is pressed down or not, we can use the method IsKeyDown() in the KeyboardState class, as shown below:Or we could use it as part of an if-statement, to do something if the key is pressed down: