Solved

Unix keyboard I/O

Posted on 1998-06-06
2
233 Views
Last Modified: 2010-04-15
How do I test for key pressed in UNIX? Better still, I am displaying data updates on a ASCII screen, and would like to lock the screen update function and invoke a command interpeter when the user presses a key. A getchar() function in a secondary thread does not seem to work well.
0
Comment
Question by:AustinKalb
2 Comments
 
LVL 2

Accepted Solution

by:
kellyjj earned 50 total points
Comment Utility
I believe you would have to capture the port for the terminal then check all input coming in.  
0
 

Author Comment

by:AustinKalb
Comment Utility
I am still struggling with this question. The old microsoft compiler had a "check keyboard buffer" function call. It returned a true when someone started typing on the keyboard, then I could go and get the data using a scanf or some other call. What I am really looking for is a way to to know someone want to type in a command without having to press return. For example, how would I read a function key without an eof after it?
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
The goal of this video is to provide viewers with basic examples to understand and use pointers in the C programming language.
The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now