Syntax
Parameters
buttons   _Out_Type: GameInputSystemButtons* Receives the set of system buttons that are pressed in this reading.
Return value
Type: bool Returnstrue if the reading contains system button state. Returns false if it doesn’t, in which case buttons is set to GameInputSystemButtonNone.
Remarks
In GameInput v4, system buttons are an ordinary input kind,GameInputKindSystemButton. Every reading from a device that has system buttons includes GameInputKindSystemButton in IGameInputReading::GetInputKind, and GetSystemButtonState returns the current state of those buttons in the same way that IGameInputReading::GetGamepadState returns the state of the gamepad buttons. To find out which system buttons a device has, call IGameInputDevice::GetSupportedSystemButtons.
The reading reports which buttons are pressed, not press or release events. To detect a press or a release, compare the state with the state from the previous reading.
This method replaces the IGameInput::RegisterSystemButtonCallback method from earlier versions of GameInput. Use IGameInput::RegisterReadingCallback with GameInputKindSystemButton, or poll with IGameInput::GetCurrentReading, to receive system button input.
System button input is delivered only while the application has focus, unless background input is enabled with IGameInput::EnableBackgroundInput.
The following example shows how to detect a new press of the Guide button.
Requirements
Header: GameInput.h Library: gameinput.lib Supported platforms: Windows, XBOX One family consoles and XBOX Series consolesSee also
Overview of GameInputIGameInputReading
GameInputSystemButtons
GameInputKind
IGameInput::EnableBackgroundInput
IGameInputDevice::GetSupportedSystemButtons
