Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > How to get keyboard event in Linux console?

Reply
Thread Tools

How to get keyboard event in Linux console?

 
 
Jia,Lu
Guest
Posts: n/a
 
      10-04-2006
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.

 
Reply With Quote
 
 
 
 
Sybren Stuvel
Guest
Posts: n/a
 
      10-04-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/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Re: Is Netscape Leaving Firefox Behind on GNU/Linux? THE LINUX PROPAGANDA MACHINE CONTINUES. FIREFOX IGNORING LINUX............. traci.manicotti@gmail.com Computer Support 2 10-20-2007 02:12 PM
Linux... yeah linux.. Linux Have a nice cup of pee NZ Computing 19 04-17-2006 10:16 AM
Keyboard error or no keyboard present??? Bud Light Computer Support 2 01-22-2005 04:00 AM
Only One Tkinter Entry can receive key event event in Linux RH8.0 wang xiaoyu Python 0 06-25-2003 04:44 AM



Advertisments