Upon reading this thread I remembered that my Razer Lycosa has a macro key function.
For those of you with configurable Razer keyboards, here is what I use:

It works for the most part, although since I purposefully made the thrust longer than the pullout (sometimes making both movements equal ends up causing you to eventually pullout of the girl) you can sometimes get "stuck" whereby you are no longer moving your dick inside the girl, but rather rocking the girl back and forth. That being said, you only tend to get "stuck" in doggy style.