Skip to main content

IGameInput::RegisterSystemButtonCallback

Registers a callback function that is called when the Guide or Share button is pressed or released.

Syntax

Parameters

device   _In_opt_
Type: IGameInputDevice*
Optionally limits registered callback to trigger a specific device. buttonFilter   _In_
Type: GameInputSystemButtons
The set of buttons to receive callbacks for, logical ORed together. context   _In_opt_
Type: void*
An object that provides relevant information for the callback function. Typically, it is the calling object. callbackFunc   _In_
Type: GameInputSystemButtonCallback
Title-defined callback function that is called when the system buttons are pressed or released. callbackToken   _Out_opt_
Type: GameInputCallbackToken*
Token identifying the registered callback function. This token is used to identify the registered function if you need to cancel or unregister the callback function.

Return value

Type: HRESULT Function result.

Remarks

This method registers a callback function call when the Guide or System button is pressed or released. Whether callbacks are dispensed depends on the GameInputFocusPolicy set by IGameInput::SetFocusPolicy in your process and other processes. See GameInputFocusPolicy for details. On the XBOX, the shell always consumes the guide button, so these callbacks are never dispatched on XBOX. To stop receiving callbacks, see the IGameInput::UnregisterCallback and IGameInput::StopCallback methods. This was added in the Windows SDK 10.0.26031 preview GameInput.h and will be added to a future release of the GDK. The following code example demonstrates how to listen for presses of the Guide button.

Requirements

Header: GameInput.h Library: gameinput.lib Supported platforms: Windows, XBOX One family consoles and XBOX Series consoles

See also

Advanced GameInput topics
Overview GameInput
IGameInput

Version History

Last modified on August 31, 2026