recognizing function key
|
Go4Expert Member
|
|
| 15Jul2008,23:18 | #1 |
|
can any one tell me how to recognize a function key in C, i mean function key does not have any ASCII value, so if i want to execute a command after pressing a function key then how can i do that??
|
|
Go4Expert Founder
|
![]() |
| 16Jul2008,09:24 | #2 |
|
Write your WndProc and see if it gets called for the Fn Keypress. If yes check out the code in Msg.
|
|
Go4Expert Member
|
|
| 16Jul2008,14:14 | #3 |
|
can you be more specific??
I have searched everywhere for function key equivalent Even I have typed a program for finding the ASCII you press a key and corresponding ASCII value will be shown on the screen In that program too the ASCII code is not showing So is there any other method with which i can recognize ascii code |
|
Mentor
|
![]() |
| 16Jul2008,14:21 | #4 |
|
What operating system are you using? It's not the same for all.
|
|
Go4Expert Member
|
|
| 16Jul2008,18:34 | #5 |
|
Quote:
Originally Posted by xpi0t0s but as i want to implement using C then i have to do it in ascii code, aint it? |
|
Mentor
|
![]() |
| 16Jul2008,23:22 | #6 |
|
No. ASCII is a characterset and has nothing to do with reading the keyboard. Some of the values correspond but that's about it.
Have a look at Get KeyState and GetAsyncKeyState in the Windows API reference. The key name constants begin with VK_, so the keycode for F1 is VK_F1. Innit. |


