Solved

Unix keyboard I/O

Posted on 1998-06-06
2
249 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 50 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

Industry Leaders: 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…
Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.

696 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