Frahm
Frahm

Reputation: 815

how to use the ExtraInformation in RAWKEYBOARD?

I'm takling about the rawinput API, see the relevant page: http://msdn.microsoft.com/en-us/library/windows/desktop/ms645575(v=vs.85).aspx

there is an ExtraInformation inside the RAWKEYBOARD structure, it said that this field is "The device-specific additional information for the event." I have tried to print out this field, and it always be 0.

so it just looks like the cbWndExtra field of WNDCLASS. but I couldn't find a way to set this field, how to use it? it would be helpful if there is a function like SetWindowLongPtr for keyboards.

Upvotes: 0

Views: 425

Answers (1)

Hans Passant
Hans Passant

Reputation: 942010

It is the same thing as returned by GetMessageExtraInfo() and the KEYBDINPUT.dwExtraInfo field as used by SendInput(). Just an extra field that the device driver can use to pass extra info to an application.

No device driver in common use on Windows installs actually uses it. Just ignore it.

Upvotes: 1

Related Questions