Input devices for games and how they work from a programmer's perspective
Dmytro Riazantsev
- Hall:
- Yellow Sea Hall (Mix Track)
What the talk is about
Dmytro Riazantsev explains how input devices (keyboard, mouse, gamepad) deliver their data to game code on Windows. He starts with a short history of these devices and how they connect, then covers the HID standard: descriptors and reports through which a device describes its buttons and axes. Next he traces the signal's path through the system: scan codes, keyboard layouts and virtual keys. He ends by comparing the APIs: Win32 window messages, Raw Input, DirectInput, XInput and Windows.Gaming.Input, with their capabilities and limits, including vibration and differing controllers. His advice: rely on scan codes rather than virtual keys for game controls; use a ready-made library such as SDL for broad controller support; XInput suits Xbox pads but is outdated. Useful for gameplay and engine programmers who need to support many controllers.