How to simulate a key press in C++ August 9, 2023 by Tarik It looks like you want to use either SendInput() or keybd_event() (which is an older way of doing the same thing).