I need to ask when the number 1 key is pressed, NOT on the Numpad, but the number 1 that is over the Q (trying to make this as clear as possible).
I've been through all the available keys on the Keys array, but no one matches the one that I am looking for.
Is there a way to do this that I'm missing?
My code:
If (currentKeyboardState.IsKeyDown(Keys.1))
Should be the Keys.D1 key. The number keys are D0-D9. The documentation is here.
The documentation says: Used for miscellaneous characters; it can vary by keyboard.
To clarify: Keys.D1 works (e.g. Keys.D[insert number here]).
if (keyState.IsKeyDown(Keys.D4))
{
Console.WriteLine("You pressed the 4 key above E and R!");
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With