If you have
KeyPreview=True
on your form then you can capture any keystrokes on the form before they get passed onto any controls on the form. You can analyse them in any of the Key*** events on the form e.g.
Private Sub Form1_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
pword += e.KeyCode.ToString()
End Sub