I would like to know if someone could please tell me how to simulate a keyboard key press by API.

Thank you in advance.