Python Dict Create Keystroke Macro