On 6 May 2015 at 14:08, Dave Angel <da...@davea.name> wrote: > I don't know why you would be expecting to get a utf-8 character for the > second byte of a function key code. It's an entirely arbitrary byte > sequence, and not equivalent to anything in Unicode, encoded or not
I just didn't think of accounting for function keys until I hit one - experimental learning. The program I'm working on doesn't require F keys, but I tried one just to see what would happen ;') It's worth making the error to reinforce unicode in my head. One item - once I dropped decoding for special keys, some were printed as hex codes but some as letters. i.e. F11 was b'\x85', but F9 and F10 were b'C' and b'D', so I assume the second byte of some function keys just happens to map to utf-8 letters. Sure enough, when I put in decoding again, F9 and F10 second bytes printed as C and D, but the program bailed on F11. -- Jim "What a rotten, failed experiment. I'll start over. Maybe dogs instead of monkeys this time." --God _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor