Chrome Extension Send Key Chrome Extension Send Key google-chrome google-chrome

Chrome Extension Send Key


Unfortunately no (it is a javascript problem, Chrome API doesn't provide any help).

All you can do is dispatch a keypress event (see this question for example), but you can't emulate actual button press. If parent page listens to keypress events, then it will catch it (this event won't have all the info as a real button press event, so it might still not work), otherwise nothing would happen.


Right now, you have to read the HTML5 spec and simulate everything that the browser would do. Here was my last attempt at it.