Possible solution: Try to simulate keypress etc. as done [here](https://github.com/bitwarden/browser/blob/master/src/content/autofill.js). Maybe [this](https://github.com/pfn/passifox/blob/master/chromeipass/chromeipass.js#L1415) is enough?