First app, thanks people

Will McGugan news at
Mon Jul 25 18:17:44 CEST 2005

Jan Danielsson wrote:
>    Oh, I do have one more question though. I'm using wxPython, and when
> I check for keys I use the evt.GetKeyCode() call, and compare it with
> integers which I have found by printing what event.GetKeyCode() returns.
> I would prefer a more portable way, since I assume that F1 doesn't have
> the same code on a Sparc Ultra10. (?) Is there a way to get "key codes"
> in wxPython in a portable manner?


You should use the keycode constants.


"".join({'*':'@','^':'.'}.get(c,0) or chr(97+(ord(c)-84)%26) for c in 

More information about the Python-list mailing list