Hello,
I am working with win32 serial communication in VC++. My application communicates with a Control Panel hardware device which is similar to a Keyboard. It has various keys/buttons (â0-9 digit keys, A-Y alphabet keys and F1,F2,F3 keysâ) on it , and is connected through the serial port of the PC. My application has to capture which key/button is pressed and released on the Control Panel board. When a key/button is pressed or released on the Control Panel board, my application should post the appropriate message to the main handling application which is responsible for processing the Key Down and Key Up messages received from Control Panel board.
My application can find out the keys pressed or released on the Control Panel board. Now I need to post WM_KEYDOWN and WM_KEYUP messages when keys are pressed or released to the handling main application. But I should find a way to tell the handling main application, that the posted WM_KEYUP or WM_KEYDOWN message is from the Control Panel board and not from the Key board. The handling main application should be able to distinguish between the WM_KEYDOWN and WM_KEYUP messages from the Keyboard and the Control Panel board.
When I went through the MSDN,
http://msdn.microsoft.com/library/d.../wm_keydown.asp
I found that there is a field âScan Codeâ in the lParam which is of use. I want to use this field to differentiate between messages of control panel buttons and keyboard keys.
But I need some more information on this:
1. Are scan codes for keyboards standardized?
2. If scan codes are standardized, where can I get a list of the unused scan code range so that I may use them for the control panel?
3. How can I set these scan codes while posting the messages trough code?
I am trying to search on google.com site for this information, but couldnât get any useful link. I have never worked with this type of application and hence am unable to proceed further.
Can anyone please help me in this? It would be of great help to me if you can give me some links or information on this area?
Thanks in anticipation of information.
Madhavi.