SendInput vs. keybd_event
MSDN states that keybd_event has been superceded by SendInput. During a rewrite I switched to using SendInput...which was fine except when trying to send an Alt-key combination. On a Win7 64-bit system (haven't tried elsewhere yet), send an Alt-key causes a long delay before the keystroke is apparent in the target application. Any ideas why? Or what I've done wrong? For now, I've gone back to keybd_event--the second version below. //Keyboard input from this version appears only after a ~4-5 second //time lag... procedure SendAltM; var KeyInputs: array of TInput; KeyInputCount: Integer; //-----