?
Solved

Unix keyboard I/O

Posted on 1998-06-06
2
Medium Priority
?
250 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 2

Accepted Solution

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

Author Comment

by:AustinKalb
ID: 1251136
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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 recursion in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.
Suggested Courses
Course of the Month9 days, 3 hours left to enroll

764 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