I have a question in keyboard input

I wish to know a input key info immediatly when it's being pushed.

When we want to know how key is pushed,We used to functions like getchar(), cin.get(), gets() ... and so on.
But, Those are needed to a input of the enter key.


But the windows programming in MFC have

WM_KEY_INPUT
WM_KEY_DOWN
...


I don't sure the message names of WM.
But I don't know how to control in console.

I've found some solution until now...

I found solution that is a interupt checking by dos.h.
But my linux system don't have dos.h.
And I didn't find out another info.


Do you have any solution?

If you have a idea please tell me :D
I'll wait your answers.
Last edited on
GetAsyncKeystate() might work, it works like i wanted it to in my program, plz read the SIMPLE file io post that has yet to be resolved . . .
console applications dont have a wm_ messages...

and if you want to handle all these messages in linux then you have to use some GUI library like qt/wxwidgets...



qt is same as MFC on windows.
http://www.qtsoftware.com/
thank kypeswith.
I wish to use only served librarys.
GetAsyncKeystate() is in windows.h.
I'll exam your source after solve my source.

thank writetonsharma.
I want to make it in console. :D
your answer is good too.

I'll study gt after learn more in console.

What do I do in console only using basic lib like using gt or another lib.
oh... :o
Topic archived. No new replies allowed.