Quote Originally Posted by LiwisJames View Post
I chose keydown because it works when the key keeps pressing and sending input, how much keypress only sends the result when pressed several times, as in a game that asks to stay clicking a button several times to accomplish something.
That's complete rubbish. If you press and hold a key then you get multiple KeyDown and KeyPress events. You can see it for yourself if you bother to test. Try this code:
vb.net Code:
  1. Private Sub TextBox1_KeyDown(sender As Object, e As KeyEventArgs) Handles TextBox1.KeyDown
  2.     Console.WriteLine($"KeyDown: {e.KeyCode} ({e.KeyData})")
  3. End Sub
  4.  
  5. Private Sub TextBox1_KeyPress(sender As Object, e As KeyPressEventArgs) Handles TextBox1.KeyPress
  6.     Console.WriteLine($"KeyPress: {e.KeyChar}")
  7. End Sub
  8.  
  9. Private Sub TextBox1_KeyUp(sender As Object, e As KeyEventArgs) Handles TextBox1.KeyUp
  10.     Console.WriteLine($"KeyUp:  {e.KeyCode} ({e.KeyData})")
  11. End Sub
Run that and watch the Output window in VS as you press, hold and release keys. Try using modifier keys as well and see the difference between KeyCode and KeyData.