How to get keyboard event in Linux console?

Sybren Stuvel sybrenUSE at YOURthirdtower.com.imagination
Wed Oct 4 02:00:54 EDT 2006


Jia,Lu enlightened us with:
> I want to deal keyboard event in Linux console.
> Example: I Create a deamon at background and when I press F1 key
> then print Hello at Console.

Type "who" and see which PTY you're connected to:

sybren   pts/0        2006-10-04 07:55 (klappie.stuvel.eu)

So I'm connected to pts/0. If you read from /dev/pts/0, you'll see
everything I type.

Sybren
-- 
Sybren Stüvel
Stüvel IT - http://www.stuvel.eu/



More information about the Python-list mailing list