VB.NET On KeyUp KeyDown Evenements

Pour activer l’écoute des touches du clavier sur le winform onload:

KeyPreview = True

exemple:

Private Sub Form1_KeyUp(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyUp
Select Case e.KeyCode
Case Keys.Right
GoNext()
Case Keys.Left
GoPrev()
Case Keys.Enter
Run()
Case Keys.Escape
Me.Close()
End Select
End Sub