TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: ALL
from: JAMIE KOWINSKY
date: 1997-11-16 21:27:00
subject: keyboard input.. under unix?

Can anyone direct me to a method or perhaps post some sample code of
how I would achive somthing like character by character keyboard input
under unix?  
I know unix is very different than the DOS i'm used to, but I hoping there is
some method that would work.
I'll be using HP-UX's C++ compiler, but I'm hoping theres a way to do it as 
standard ansi c++.
What I'm looking for is basically a function that will wait for a keypress 
and return the char pressed.  Another function would be one to check to see 
if any characters are waitng in the "keybaord buffer" if such a thing exists 
under unix.  Then perhaps a hybrid function that will return as soon as its 
called with a char if one was waiting or a nul if one was not.
thanks for any help you may be able to give.
l8tr
-Jam
... Epitaph:  Your last chance to leave a good tagline.
--- FMail/386 1.02
---------------
* Origin: KastlerocK + Jeannette, PA + 412.527.3749 (1:129/230)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.