DirectInput
Microsoft API / From Wikipedia, the free encyclopedia
Dear Wikiwand AI, let's keep it short by simply answering these key questions:
Can you list the top facts and stats about DirectInput?
Summarize this article for a 10 year old
In computing, DirectInput is a legacy[1] Microsoft API for collecting input from a computer user, via input devices such as the mouse, keyboard, or a gamepad. It also provides a system for action mapping, which allows the user to assign specific actions within a game to the buttons and axes of the input devices. Additionally it handles haptic feedback (input/output) devices. Microsoft introduced a new input library called XInput specifically for the Xbox 360 controller.
DirectInput and XInput provide benefits over normal Win32 input events:
- they enable an application to retrieve data from input devices even when the application is in the background
- they provide full support for any type of input device, as well as for haptic feedback
- through action mapping, applications can retrieve input data without needing to know what kind of device generated that input
While DirectInput forms a part of the DirectX library, it has not been significantly revised since DirectX 8 (2001–2002). Microsoft recommends that new applications make use of the Windows message loop for keyboard and mouse input instead of DirectInput (as indicated in the Meltdown 2005 slideshow[2]), and to use GameInput instead of DirectInput and other legacy APIs, such as XInput, for controllers.[3]