468,316 Members | 1,498 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,316 developers. It's quick & easy.

How to get keyboard event in Linux console?

Hi all,
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.

Can python do it? with which module?

Thanks.

Oct 4 '06 #1
1 2984
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/
Oct 4 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Michael Bendzick | last post: by
1 post views Thread by Scott Shaw | last post: by
1 post views Thread by Keeper | last post: by
2 posts views Thread by Keeper | last post: by
8 posts views Thread by Cyber | last post: by
3 posts views Thread by Paulers | last post: by
16 posts views Thread by dfaber | last post: by
12 posts views Thread by =?ISO-8859-1?Q?Joaqu=EDn_Zuazo?= | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.