Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #54056
| References | <38b49476-607e-43ed-bd70-804ff8329ad0@googlegroups.com> <mailman.263.1378931057.5461.python-list@python.org> <54dfa194-a84d-4b65-b9d8-1b26ec090fb3@googlegroups.com> |
|---|---|
| Date | 2013-09-13 01:27 +1000 |
| Subject | Re: Send alt key to subprocess.PIPE stdin |
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.313.1378999677.5461.python-list@python.org> (permalink) |
On Fri, Sep 13, 2013 at 12:06 AM, Wanderer <wanderer@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
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Send alt key to subprocess.PIPE stdin Wanderer <wanderer@dialup4less.com> - 2013-09-11 07:26 -0700
Re: Send alt key to subprocess.PIPE stdin Nobody <nobody@nowhere.com> - 2013-09-11 18:18 +0100
Re: Send alt key to subprocess.PIPE stdin Gary Herron <gherron@digipen.edu> - 2013-09-11 10:43 -0700
Re: Send alt key to subprocess.PIPE stdin Wanderer <wanderer@dialup4less.com> - 2013-09-11 13:15 -0700
Re: Send alt key to subprocess.PIPE stdin Dave Angel <davea@davea.name> - 2013-09-11 20:23 +0000
Re: Send alt key to subprocess.PIPE stdin Wanderer <wanderer@dialup4less.com> - 2013-09-12 07:06 -0700
Re: Send alt key to subprocess.PIPE stdin Chris Angelico <rosuav@gmail.com> - 2013-09-13 01:27 +1000
Re: Send alt key to subprocess.PIPE stdin Nobody <nobody@nowhere.com> - 2013-09-12 18:20 +0100
csiph-web