Click to See Complete Forum and Search --> : Extended key in keybd_event?


leojose
November 25th, 2005, 01:07 AM
Hi all,

VOID keybd_event(BYTE bVk, BYTE bScan, DWORD dwFlags, PTR dwExtraInfo);

dwFlags
[in] Specifies various aspects of function operation. This parameter can be one or more of the following values.
KEYEVENTF_EXTENDEDKEY
If specified, the scan code was preceded by a prefix byte having the value 0xE0 (224).
KEYEVENTF_KEYUP
If specified, the key is being released. If not specified, the key is being depressed.
What does KEYEVENTF_EXTENDEDKEY mean here? What happens if I don't specify it in the api?

olivthill
November 25th, 2005, 07:37 AM
In winuser.h, you can see:
#define KEYEVENTF_EXTENDEDKEY 0x00000001
#define KEYEVENTF_KEYUP 00000002KEYEVENTF_EXTENDEDKEY is only a flag to tell Windows if you want to get the extended key or the key. The extended key is useful in some cases, e.g. when you want to know if a number has been pressed from the keypad or from the keyboard above the QWERTY. But it depends on the layout of the keyboards, therefore that's not recommended for international applications.

leojose
November 25th, 2005, 09:52 AM
The extended key is useful in some cases, e.g. when you want to know if a number has been pressed from the keypad or from the keyboard above the QWERTY.
Thanks for confirming that its not important.
but I would like to clarify one concept that I had about 'extended key'
When we press Ctlr-Shift-<some key>...or some such combination of keys, does that represent an Extended key?
Or do the keys outside the alpha-numeric section like the Insert, End, etc. which have an 'extended code representation'(the binary value of these keys are longer than others) are called extended keys?