Simulate my keyboard
VimScript, 48 47 bytes

Vim has some nice builtins for this. Requires Vim 8.



se ri|cal timer_start(10,{-&gt;execute("se ri&amp;")})


Expects text entered in insert mode, a very reasonable input for VimScript. Explanation:

se ri " short for 'set revins', or 'reverse insert'
cal timer_start(10, " Start a timer that fires after 10ms
                 {-&gt;execute("se ri&amp;")}) " Give it a lambda that unsets ri


My initial approach, se ri|sl10m|se ri&amp;, doesn't work because the text is buffered until after the sleep command, and I couldn't find a way around this.