I could just add in something that creates typos based on Levenshtein distance of two, or something like that, or reverse-engineer Norvig's article on spellchecking.
However, what are the most common ways to typos?
Has somebody written a method?
There's no such thing as general typo generation algorithm because this kind of algorithm depends on the target language and application - ie to generate spam domains you basically need to apply following strategies (using meta.stackoverflow.com as an example):
In case of character replacement we can have at least two scenarios:
Hope this helps..