> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# IGameInput::EnableBackgroundInput

> Enables or disables delivery of input to the application while it is in the background.

Enables or disables delivery of input to the application while it is in the background.

## Syntax

```cpp theme={null}
void EnableBackgroundInput(
    bool enable
);
```

### Parameters

*enable*   \_In\_\
Type: bool

`true` to receive input while the application doesn't have focus; `false` to receive input only while the application has focus.

### Return value

Type: void

This method doesn't return a value.

## Remarks

By default, GameInput delivers input to an application only while it's in the foreground and has focus. Call `EnableBackgroundInput(true)` to also receive input while another application has focus. Background input applies to all input kinds at once, including the Guide and Share system buttons that are reported through [IGameInputReading::GetSystemButtonState](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getsystembuttonstate.md). Call `EnableBackgroundInput(false)` to return to the default behavior.

This setting is primarily relevant on Windows, where several applications can run side by side and the focus can move between them.

This method replaces the [IGameInput::SetFocusPolicy](https://docs.xbox.com/reference/input/gameinput/deprecated/interfaces/igameinput/methods/igameinput_setfocuspolicy.md) method and the [GameInputFocusPolicy](https://docs.xbox.com/reference/input/gameinput/deprecated/enums/gameinputfocuspolicy.md) enumeration from earlier versions of GameInput. The exclusive foreground policies, which prevented other processes from receiving input, aren't available in GameInput v4.

On PC, when the GameInput runtime is sideloaded with the application, rather than installed on the system, enabling background input is ignored. For more information, see [GameInput sideloading](https://docs.xbox.com/build/core-features/common/input/overviews/input-agility-redistributable.md).

> [!NOTE]
>
> Many users run overlay applications that use the Guide button for menus and the Share button for screenshots. Consider whether your application needs to process system buttons while it's in the background.

## Requirements

**Header:** GameInput.h

**Library:** gameinput.lib

**Supported platforms:** Windows, XBOX One family consoles and XBOX Series consoles

## See also

[Overview of GameInput](https://docs.xbox.com/build/core-features/common/input/overviews/input-overview.md)\
[GameInput fundamentals](https://docs.xbox.com/build/core-features/common/input/overviews/input-fundamentals.md)\
[GameInput sideloading](https://docs.xbox.com/build/core-features/common/input/overviews/input-agility-redistributable.md)\
[IGameInput](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinput/igameinput.md)\
[IGameInput::SetFocusPolicy (Deprecated)](https://docs.xbox.com/reference/input/gameinput/deprecated/interfaces/igameinput/methods/igameinput_setfocuspolicy.md)

## Version History

| Version | Changes |
| - | - |
| **v4** | Introduced. |


## Related topics

- [IGameInput::SetFocusPolicy (Deprecated)](https://docs.xbox.com/reference/input/gameinput/deprecated/interfaces/igameinput/methods/igameinput_setfocuspolicy.md)
- [GameInputFocusPolicy (Deprecated)](https://docs.xbox.com/reference/input/gameinput/deprecated/enums/gameinputfocuspolicy.md)
- [IGameInputReading::GetSystemButtonState](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getsystembuttonstate.md)
- [GameInput sideloading](https://docs.xbox.com/build/core-features/common/input/overviews/input-agility-redistributable.md)
- [Deprecated GameInput API members](https://docs.xbox.com/reference/input/gameinput/deprecated/gameinput_deprecated_members.md)
