By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
439,931 Members | 2,015 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 439,931 IT Pros & Developers. It's quick & easy.

How to get keyboard event in Linux console?

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.