# SimConnect_UnsubscribeInputEvent The **SimConnect\_UnsubscribeInputEvent** function is used to unsubscribe from an input event that has previously been subscribed to.   ##### Syntax ``` cpp HRESULT SimConnect_UnsubscribeInputEvent( HANDLE hSimConnect, UINT64 Hash ) ```   ##### Parameters {{< table-wrapper >}} | Parameter | Description | Type | |---------------|------------------------------------------------------------------------------------------------------------------------------------|---------| | `hSimConnect` | Handle to a SimConnect object. | Integer | | `Hash` | Hash ID that will identify the desired input event to unsubscribe from. You can use 0 here to unsubscribe from *all* input events. | 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 >}}   ##### Remarks This function will unsubscribe from a specific input event based on the given hash (you can retrieve the input event hashes using [`SimConnect_EnumerateInputEvents`](simconnect-enumerateinputevents/)). You may also supply 0 (null) as the hash value, in which case you will be unsubscribing from *all* input events. The function generates no response event.