VB Press and hold keystroke
问题 I am creating a macro program to record and play back mouse and keyboard input. Recording works fine, as does mouse playback, but I am having trouble in playing back the keyboard input - specifically pressing and holding a key for several seconds before releasing. This is not equivalent to repetitively pressing the key. This is what I have tried: Technique 1: Me.KeyDown Private Sub keyboard_pressed() Handles Me.KeyDown Dim keypress = e.KeyData MsgBox(keypress) End Sub Only works when window