The handler returned by the KeyDown handler contains all the information you need to accomplish what you want.
Try this in firebug:
$('#your-input').keydown( function(e) { console.log(e.timeStamp); console.log(e.keyCode); } );
You just need to save the data from the handler (var e), which has the timeStamp and keyCode property.
Then you can set a timer with the difference between the keys to simulate them.
source share