On Load check if your KEYPREVIEW is set to true
Private Sub XXXX_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.KeyPreview = True
End Sub
Then you just implement a keydown function
Private Sub XXXX_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
If e.KeyCode = Keys.Space Then
MsgBox("Space button pressed")
End If
End Sub
This works for me.