# SimConnect_SetInputGroupState The **SimConnect\_SetInputGroupState** function is used to turn requests for input event information from the server on and off.   ##### Syntax ``` cpp HRESULT SimConnect_SetInputGroupState( HANDLE hSimConnect, SIMCONNECT_INPUT_GROUP_ID GroupID, DWORD dwState ); ```   ##### Parameters {{< table-wrapper >}} | Parameter | Description | Type | |---------------|----------------------------------------------------------------------------------------------------------------------------------------------------|---------| | *hSimConnect* | Handle to a SimConnect object. | Integer | | *GroupID* | Specifies the ID of the client defined input group that is to have its state changed. | Integer | | *dwState* | Double word containing the new state. One member of the [SIMCONNECT\_STATE](../structures-and-enumerations/simconnect-state/) enumeration type. | Integer | {{< /table-wrapper >}}   ##### Return Values The function returns an **HRESULT**. Possible values include, but are not limited to, those in the following table. {{< table-wrapper >}} | Return value | Description | |--------------|-------------------------| | S\_OK | The function succeeded. | | E\_FAIL | The function failed. | {{< /table-wrapper >}}   ##### Example ``` cpp static enum INPUT_ID { INPUT_1, INPUT_2 }; static enum EVENT_ID { EVENT_1, EVENT_2 }; .... hr = SimConnect_MapClientEventToSimEvent(hSimConnect, EVENT_1, "parking_brakes"); hr = SimConnect_MapInputEventToClientEvent(hSimConnect, INPUT_1, "ctrl+U+Q", EVENT_1); hr = SimConnect_SetInputGroupState(hSimConnect, INPUT_1, SIMCONNECT_STATE_ON); ```   ##### Remarks The default state for input groups is to be inactive, so make sure to call this function each time an input group is to become active.