On 23 май, 22:32, Jimmy <[EMAIL PROTECTED]> wrote:
[...]
> however, how can I just simply know a key is pressed?

If you are on Linux, use XLib
http://python-xlib.sourceforge.net/

You need to catch the KeyPress or KeyRelease X events.
while 1:
    ev = display.next_event()
    if ev.type == X.KeyPress:
        key_code = ev.detail
        ....
    ....

Ivan

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to