python script to generate key strokes