|
-
May 19th, 2009, 09:51 AM
#1
[RESOLVED] virtual-key code VK_SHIFT question
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!
-
May 19th, 2009, 11:46 AM
#2
Re: virtual-key code VK_SHIFT question
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..
-
May 19th, 2009, 12:40 PM
#3
Re: virtual-key code VK_SHIFT question
 Originally Posted by Komerad
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!
-
May 19th, 2009, 01:05 PM
#4
Re: virtual-key code VK_SHIFT question
Thx, i was looking for a list like this one :
http://www.indigorose.com/webhelp/am..._Key_Codes.htm
Not good at changing hex to decimal. So having a list like that gives me an easy overview
-
May 19th, 2009, 07:48 PM
#5
Re: virtual-key code VK_SHIFT question
Anyone know the keycodes for % ^ [ ] ... ?
-
May 20th, 2009, 07:47 AM
#6
Re: virtual-key code VK_SHIFT question
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().
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|