
- Forum
- Programming Talk
- C and C++
- Is there any predefined function
Is there any predefined function
This is a discussion on Is there any predefined function within the C and C++ forums, part of the Programming Talk category; Is there any predefined function or command available in C programming language for detecting key press of a user? I ...
-
Is there any predefined function
Is there any predefined function or command available in C programming language for detecting key press of a user? I am using windows XP operating system.
-
There are various ways of getting the value of key pressed and then detecting the key presses. One way is to use getchar() function in C program which returns the ASCII value of the key pressed.
-
I think you can also make use of getch() function to get your results. Someone kindly update me on this.
-
I think shift key has problem using getchar() but for shift key you can use getch().Someone correct me if I am wrong. Also I think there may be some keys which do not have associated ASCII equivalents.
-
Yes you right there may be some keys which do not have associated ASCII equivalents. For handling such instances make use of virtual key codes to detect the key pressed.
-
Sponsored Ads

Reply With Quote





