How to get keyboard input from C in Linux
I am develop a "counsol application" (command line environment).
I want to know how to get keyboard input from a C program. (this means the user interactes with the program by typing into the command line.) This program is related to creating teaching material for high school programing class. I want to avoid using advanced GUI IDE. I plan to use the open source IDE Rhide. or just use gcc. |
Well,if u know C,just do whatever u know(i mean ANSI C and POSIX C).Else try learning C.
Or did u mean some high funda things i was not able to follow??Then sorry,i cant help u. |
do you actually know C? these sorts of things are usually taught early on :)
whenever i program in C (not too often i must admit) i would do something as follows: Code:
#include <iostream.h> EDIT - i dont know if your question is more about whether you can use the same code in Linux as you would when coding in windows, to bring the Dos prompt. Its normally exactly the same. |
Yes, I fogot many things I learned years ago. Sorry.
Actually, I can use getchar(), read(), getc(stdin), or maybe fscanf(stdin, ...). The cin and cout are C++ stuff. |
Send Data From Application to PS/2 Port
I have designed small circuit using PS/2 port for communication with PC. Its easy to send data from my circuit to application(the data is treated as normal keypress)
but I don't know, How to send data from application (using C language) to PS/2 keyboard port ? |
All times are GMT -5. The time now is 05:38 PM. |