On Fri, Sep 13, 2013 at 12:06 AM, Wanderer <wande...@dialup4less.com> wrote: > Thanks, I didn't know that. I thought there would be some \n \t kind of > combination or a unicode string for all the key combinations on my keyboard.
Unicode identifies every character, but keystrokes aren't characters. Consider, for instance, the difference between the keypress Shift+A and the letter produced - even in the most simple ASCII-only US-only situation, that could produce either "A" or (if Caps Lock is active) "a". So if you actually want to trigger Shift+A, you can't represent that with a character. Controlling a GUI app has to be done with keystrokes, so it needs a GUI controlling tool. That said, though: These sorts of keystrokes often can be represented with escape sequences (I just tried it in xterm and Alt-D came out as "\e[d"), so you could control a console program using sequences that you could put into a string. But that's not true of your typical GUI system. ChrisA -- https://mail.python.org/mailman/listinfo/python-list