[comp.unix.programmer] Keypress with time-out.

sinclair@cs.glasgow.ac.uk (Duncan Sinclair) (12/02/90)

Simple, easy question:

Can anyone supply me with portable code which will "poll"
my tty for (say) five seconds, and return any keypress which
it gets?

This is mainly for SunOS, but we also have some SYSV-type systems...

Thanks,


-- 
Duncan Sinclair                     |  Try one    sinclair@cs.glasgow.ac.uk
Computing Science Research Student  |  of these:  sinclair@uk.ac.glasgow.cs
University of Glasgow               |..!mcsun!ukc!uk.ac.glasgow.cs!sinclair
Quote: "It takes a smart man to know when he's stupid." -- Barney Rubble