im trying to make a little game and i cant find how to use the keyboard to control it what does the code look like?

For windows application, set KeyPreview property of Form to True and handle key (KeyPress, KeyDown....) events.

Set KeyPreview Property of Form1 at design time.

Public Class Form1
    Private Sub Form1_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
        If e.KeyCode = Keys.F1 Then
            MsgBox("F1 is pressed")
        Else
            If e.KeyCode = Keys.Escape Then
                MsgBox("Esc is pressed")
            End If
        End If
    End Sub
End Class