![]() |
recognizing function key
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??
|
Re: recognizing function key
Write your WndProc and see if it gets called for the Fn Keypress. If yes check out the code in Msg.
|
Re: recognizing function key
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 |
Re: recognizing function key
What operating system are you using? It's not the same for all.
|
Re: recognizing function key
Quote:
but as i want to implement using C then i have to do it in ascii code, aint it? |
Re: recognizing function key
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. |
| All times are GMT +5.5. The time now is 06:57. |