On 23 май, 22:32, Jimmy <mcknight0... at gmail.com> 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