Public Class Form1
Protected Overrides Function ProcessDialogKey(ByVal keyData As System.Windows.Forms.Keys) As Boolean
Select Case (keyData)
Case Keys.F10
'Replace F10 with the Key you want to type something
SendKeys.Send(textBox1.text)
SendKeys.Send("{ENTER}")
End Select
Return MyBase.ProcessDialogKey(keyData)
End Function