![]() |
VOOZH | about |
dotnet add package Microsoft.GameInput --version 3.4.218
NuGet\Install-Package Microsoft.GameInput -Version 3.4.218
<PackageReference Include="Microsoft.GameInput" Version="3.4.218" />
<PackageVersion Include="Microsoft.GameInput" Version="3.4.218" />Directory.Packages.props
<PackageReference Include="Microsoft.GameInput" />Project file
paket add Microsoft.GameInput --version 3.4.218
#r "nuget: Microsoft.GameInput, 3.4.218"
#:package Microsoft.GameInput@3.4.218
#addin nuget:?package=Microsoft.GameInput&version=3.4.218Install as a Cake Addin
#tool nuget:?package=Microsoft.GameInput&version=3.4.218Install as a Cake Tool
GameInput is a next-generation input API that exposes input devices of all kinds through a single consistent interface. It's designed with a simple programming model that makes it easy to use. GameInput is built from the ground up for the best possible performance. Key features of the GameInput API are as follows.
Availability:
GameInput is available on Xbox via the GDK and PC via NuGet. Older versions of Windows going back to Windows 10 19H1 (May 2019 update) are supported.
Consistency:
GameInput exposes input from keyboards, mice, gamepads, and other game controllers via a single unified input model, synchronized to a common time base. The code for handling input from these devices is nearly identical, using many of the same functions but with different filters applied. This makes it easy to add support for additional input devices, without major changes to input code.
Functionality:
GameInput is a functional superset of all legacy input APIs—XInput, DirectInput, Raw Input, Human Interface Device (HID), and WinRT APIs—in addition to adding new features of its own. GameInput's functionality ranges from simple fixed-format gamepad state to detailed low-level raw device access. Input can be obtained via polling or callbacks in an event-driven way. Haptics and force feedback are fully supported, and third-party device SDKs can easily be written on top of GameInput to provide access to custom device features.
Performance:
GameInput is built around an entirely new direct memory access (DMA) architecture for the lowest possible input latency and resource usage. Nearly all API functions are lock-free with strict performance guarantees, while still being 100 percent thread-safe. This makes them safe to call from time-sensitive contexts such as render threads. Advanced applications can take direct control of scheduling GameInput's internal asynchronous work queues, controlling which thread does the work and how often.
Usability
GameInput was designed with ease of use as a top priority. Most common input tasks can be implemented with just a few lines of code.
NOTE: For this and future GameInput NuGet releases, if you also build for console, GDK 2510 or newer is required to use this package. If your console build requires a GDK older than 2510, do not upgrade to this or future NuGet packages.
NOTE: The PC redistributable included in this and future packages can and should always be packaged with your title if you use GameInput on PC.
"PlayStation" is a registered trademark or trademark of Sony Interactive Entertainment Inc.
"DualSense" is a registered trademark or trademark of Sony Interactive Entertainment Inc.
GAMEINPUT_CURRENT_CALLBACK_TOKEN_VALUE value.initguid.h for GUID constants.GameInputBlockingEnumeration.GameInputInitialize for specifying API version during creation.GameInput.lib for improved cross-platform support; source code is now also included.supportedSystemButtons field not being correctly populated for some devices.OutputDebugString logging.DirectInputEscape call.revisionNumber, hardwareVersion, firmwareVersion, and containerId to GameInputDeviceInfo.GameInputDeviceInfo."PlayStation" is a registered trademark or trademark of Sony Interactive Entertainment Inc.
"DualSense" is a registered trademark or trademark of Sony Interactive Entertainment Inc.
IGameInput instance.CoInitialize.FindDeviceFromId method not returning requested device.While this version of GameInput is applicable to PC only, if you are using a previous version of GameInput on PC, or sharing code with GameInput on Xbox using the GDK, please note that many unimplemented functions and corresponding enums and constants have been removed. Additionally, the API has been placed in the GameInput::v1 namespace to facilitate versioning. Future versions of GameInput will be in their own versioned namespaces. Due to these changes, you may experience compilation errors when building that code using this (and future) versions. Notable changes include:
IGameInputDevice::GetDeviceInfo previously returned the resulting IGameInputDeviceInfo struct as the function's return value. This struct is now returned as an out parameter on the function, and the function's return value is now an HRESULT.
IGameInput::UnregisterCallback previously took a timeout value as its second parameter, however this parameter has been removed. In these two cases, along with the touch API used for XCloud on console, use the GAMEINPUT_API_VERSION define to conditionally compile (or exclude) code between PC and console.
IGameInputReading::GetSequenceNumber has been removed. Please use IGameInputReading::GetTimestamp instead.
Example:
#include <GameInput.h>
#ifndef GAMEINPUT_API_VERSION
#define GAMEINPUT_API_VERSION 0
#endif
#if GAMEINPUT_API_VERSION == 1
using namespace GameInput::v1;
#elif GAMEINPUT_API_VERSION == 2
using namespace GameInput::v2;
#elif GAMEINPUT_API_VERSION == 3
using namespace GameInput::v3;
#endif
// ...
#if GAMEINPUT_API_VERSION >= 2
device->GetDeviceInfo(&deviceInfo);
#else
deviceInfo = device->GetDeviceInfo();
#endif
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
Showing the top 2 NuGet packages that depend on Microsoft.GameInput:
| Package | Downloads |
|---|---|
|
FonsecaFramework.Gaming
A C# Game Engine |
|
|
GameInputSharp.Core
Universal, idiomatic C# wrapper for Microsoft.GameInput. Gamepads, keyboards, mice, advanced haptics, device callbacks, and force feedback. Requires Microsoft.GameInput NuGet and gameinput.dll redistribution per Microsoft rules. |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.4.218 | 2,750 | 5/18/2026 |
| 3.3.221 | 305 | 5/15/2026 |
| 3.3.195 | 3,142 | 4/11/2026 |
| 3.3.182 | 564 | 4/2/2026 |
| 3.3.174 | 617 | 3/26/2026 |
| 3.3.171 | 368 | 3/23/2026 |
| 3.3.163 | 891 | 3/10/2026 |
| 3.2.138 | 1,688 | 2/12/2026 |
| 3.2.135 | 893 | 2/5/2026 |
| 3.2.134 | 2,286 | 1/28/2026 |
| 3.1.26100.6879 | 19,784 | 10/20/2025 |
| 3.0.26100.6154 | 1,075 | 10/7/2025 |
| 2.2.26100.6114 | 1,766 | 9/16/2025 |
| 2.1.26100.6068 | 3,115 | 8/11/2025 |
| 2.0.26100.5334 | 1,591 | 7/16/2025 |
| 1.2.26100.4782 | 6,884 | 4/21/2025 |