adding key stroke capture in python