I doubt that there is any officially supported way because browsers are such a popular attack-vector, faking user keypresses would be an effective way to do bad things (vis click-fraud). That said, this question has some suggestions for simulating keypresses.