Solved

Unix keyboard I/O

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

Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

736 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