Click to See Complete Forum and Search --> : [RESOLVED] virtual-key code VK_SHIFT question
smallwolf
May 19th, 2009, 09:51 AM
hello:
when we press and hold the "shift" key, it generates the VK_SHIFT,and then i press "1" key,
it generate character "!".
what is going on in the wParam and lParam in this process?
(sorry for my bad english)
thanks! have a nice day! :)
Komerad
May 19th, 2009, 11:46 AM
Whats the full code? I got something similar and found that :
Numbers are either to be spoken to as VK_NUMPADX (where X is the representing number)
OR
I also noticed that A shift is to be generated to get the number in return.
But apearently you are using another keyboard layout as i do.
You happen to know where I find a full list of valid wVk numbers? i found one but lost it and the closest info i found again was that they are numbers from 1-256 or something..
smallwolf
May 19th, 2009, 12:40 PM
Whats the full code? I got something similar and found that :
Numbers are either to be spoken to as VK_NUMPADX (where X is the representing number)
OR
I also noticed that A shift is to be generated to get the number in return.
But apearently you are using another keyboard layout as i do.
You happen to know where I find a full list of valid wVk numbers? i found one but lost it and the closest info i found again was that they are numbers from 1-256 or something..
just go to www.microsoft.com, and then type "virtual key code" to search, and you
find the virtual key codes for WinCE and Windows.
I hope this is helpful for you!Good luck!
Komerad
May 19th, 2009, 01:05 PM
Thx, i was looking for a list like this one :
http://www.indigorose.com/webhelp/ams/Program_Reference/Misc/Virtual_Key_Codes.htm
Not good at changing hex to decimal. So having a list like that gives me an easy overview
Komerad
May 19th, 2009, 07:48 PM
Anyone know the keycodes for % ^ [ ] ... ?
olivthill2
May 20th, 2009, 07:47 AM
You can see the names and codes in winuser.h
But there is no VK_xxx name for many keys. In that case (e.g. % ^ [ ]), you use the ascii code instead.
By the way, beware that
- special keys (F1, F2, up, down, insert) are usually tested in the code for the WM_KEYDOWN or WM_KEYUP message,
- ordinary keys (A, B, %, [...) are usually tested in the code for the WM_CHAR message,
- and other keys (shift, ctrl) are tested with GetKeyState().
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.