A utility to test, visualize, and map WM_INPUT messages. Windows only.
RawInputViewer listens for WM_INPUT
keyboard messages and shows each event in a list view: virtual key, scan code, flags, SAL,
Raylib, and GLFW key name mappings, and which physical device sent the input.
Ready made Windows binaries are attached to GitHub Releases:
| File | Description |
|---|---|
RawInputViewer-x64.exe |
64 bit Windows (recommended) |
RawInputViewer-x86.exe |
32 bit Windows |
Download and run. If SmartScreen complains, choose More info and then Run anyway. The
release builds are not code signed. To compile your own copy, see How to Build.
Press keys on any connected keyboard. Each key down and key up appears as a new row. Values that Adjust mode changed are drawn in bold.
Clear the list with the Clear button on the main toolbar, or with a right click anywhere. The app registers for raw mouse input and treats a right button release as clear.
| Button | Type | Description |
|---|---|---|
| Clear | action | Removes every row from the list and resets internal key sequence state. |
| Adjust | toggle (on by default) | Normalizes raw keyboard data before display. It fills in missing make codes from the virtual key, handles E0 and E1 scan code sequences, tells left from right Shift, Ctrl, and Alt, and resolves Pause/Break versus Num Lock on scan code 0x45. Turn it off to see the unmodified RAWINPUT keyboard fields. |
These toggles call RegisterRawInputDevices again with different flags. Both start checked,
which matches ordinary Windows behavior.
| Button | Type | Checked (default) | Unchecked |
|---|---|---|---|
| No Hotkeys | toggle | System hotkeys such as Alt+Tab behave normally. | RIDEV_NOHOTKEYS is set. Hotkey combinations reach this app as raw keyboard input instead of triggering the system action. |
| No Legacy | toggle | Legacy WM_KEY* and WM_MOUSE* messages are still generated alongside raw input. |
RIDEV_NOLEGACY is set. Legacy keyboard and mouse messages for the registered devices are suppressed. |
If re-registration fails, the toggle returns to its previous state.
Click the arrow on a numeric column header to change the display format where that is supported:
- Decimal, Hexadecimal, or Binary for virtual key, make code, flags, and key code columns
- SAL, Raylib, or GLFW for the key code name column
Window size, column widths, and display formats are saved under HKEY_CURRENT_USER and
restored on the next launch.
Build on Windows with Visual Studio. There is no Linux or macOS port and no cross compilation. The x64 and x86 binaries both come from native MSVC on the same machine, using different CMake architecture presets.
The project uses Visual Studio with C++23 and modern C++ features such as concepts and ranges.
- Visual Studio 2022 or newer with the
Desktop development with C++workload installed.
-
Clone the repository
git clone https://github.com/RealBitdancer/RawInputViewer.git && cd RawInputViewer
-
Configure with CMake
The Visual Studio generator comes from the host default, so any installed version will do.
64 bit:
cmake --preset default
32 bit:
cmake --preset msvc-x86
-
Build
From the command line:
cmake --build --preset release
Presets are
debug,release,x86-debug, andx86-release.Or open the generated solution in Visual Studio, choose
DebugorRelease, and pressF5orCtrl+F5:start build\msvc-x64\RawInputViewer.slnRecent CMake and Visual Studio versions may produce
RawInputViewer.slnxinstead ofRawInputViewer.sln.
While working on a personal platform abstraction library (SAL), I kept running into WM_INPUT quirks. I wrote a small Windows desktop program to test keyboard input on different machines. It was meant for my own use. After reading more about raw input, I thought others wrestling with the same API might find it useful, so I cleaned it up enough to show in public. Here it is.
Icons and bitmaps were assembled with Axialis IconWorshop.
MIT. See LICENSE. Copyright (c) 2025-2026 Bitdancer (github.com/RealBitdancer).
See also Changelog, Contributing, and Security.
