SendKeys.Send(" ")

Private Declare Auto Function SendMessage Lib "user32.dll" ( ByVal hwnd As IntPtr, ByVal wMsg As Int32, ByVal wParam As Int32, ByVal lParam As Int32 ) As Int32
Private Const WM_KEYDOWN = &H100
Private Const WM_KEYUP = &H101
Private Const VK_SPACE = &H20
Dim p As Process
Dim title As String
Dim handle As IntPtr
Sub SetProcess(ByRef Name As String)
For Each p In Process.GetProcessesByName("ProcessName") 'Without the: .exe | File Extension
title = p.MainWindowTitle
handle = p.MainWindowHandle
Next
End Sub
Sub DoJump()
SendMessage(handle, WM_KEYDOWN, VK_SPACE, 0&)
SendMessage(handle, WM_KEYUP, VK_SPACE, 0&)
End Sub
<DllImport("user32.dll", CharSet:=CharSet.Auto, ExactSpelling:=True)> Public Shared Function GetAsyncKeyState(ByVal vkey As Keys) As Boolean
End Function
If GetAsyncKeyState = Keys.F1 Then SendKeys.Send(" ")
If GetAsyncKeyState = Keys.F1 Then DoJump()