Programatically call mouse and keyboard events