I have made a logic which triggers in an editor (a third party module which I should not modify) a drop-down menu with intellisense suggestions by pressing space key. The thing is that the logic needs two keystrokes (or more) and performs some processing in between but I only want to press the space key once then use the mouse for further user actions. So I have to generate the consequent keystrokes. One of my idea was to clone/re-dispatch the first event but no matter what I have tried the resulting event has isTrusted == false and, although editor's event handler is triggered, the key is not written in the editor and drop-down not shown.

How to generate or clone or re-dispatch a trusted event?

0 Answers