Code here, and a detailed explanation of what's simulated: https://github.com/InconsolableCellist/typewriter