Raw Input

July 15, 2025 ยท View on GitHub

This section describes how the system provides raw input to your application and how an application receives and processes that input. Raw input is sometimes referred to as generic input.

In This Section

NameDescription
About Raw InputDiscusses user-input from devices such as joysticks, touch screens, and microphones.
Using Raw InputProvides sample code for tasks relating to raw input.
Raw Input ReferenceContains the API reference.

Functions

NameDescription
DefRawInputProcCalls the default raw input procedure to provide default processing for any raw input messages that an application does not process. This function ensures that every message is processed. DefRawInputProc is called with the same parameters received by the window procedure.
GetRawInputBufferPerforms a buffered read of the raw input data.
GetRawInputDataGets the raw input from the specified device.
GetRawInputDeviceInfoGets information about the raw input device.
GetRawInputDeviceListEnumerates the raw input devices attached to the system.
GetRegisteredRawInputDevicesGets the information about the raw input devices for the current application.
RegisterRawInputDevicesRegisters the devices that supply the raw input data.

Macros

NameDescription
GET_RAWINPUT_CODE_WPARAMGets the input code from wParam in WM_INPUT.
NEXTRAWINPUTBLOCKGets the location of the next structure in an array of RAWINPUT structures.

Notifications

NameDescription
WM_INPUTSent to the window that is getting raw input.
WM_INPUT_DEVICE_CHANGESent to the window that registered to receive raw input.

Structures

NameDescription
RAWHIDDescribes the format of the raw input from a Human Interface Device (HID).
RAWINPUTContains the raw input from a device.
RAWINPUTDEVICEDefines information for the raw input devices.
RAWINPUTDEVICELISTContains information about a raw input device.
RAWINPUTHEADERContains the header information that is part of the raw input data.
RAWKEYBOARDContains information about the state of the keyboard.
RAWMOUSEContains information about the state of the mouse.
RID_DEVICE_INFODefines the raw input data coming from any device.
RID_DEVICE_INFO_HIDDefines the raw input data coming from the specified HID.
RID_DEVICE_INFO_KEYBOARDDefines the raw input data coming from the specified keyboard.
RID_DEVICE_INFO_MOUSEDefines the raw input data coming from the specified mouse.