Skip to content

Commit

Permalink
requesthandler: Add note about as-is status of hotkey requests
Browse files Browse the repository at this point in the history
Too much trouble for too little gain. Please stop using these requests.
  • Loading branch information
tt2468 committed Jan 19, 2024
1 parent b806a0c commit b53527c
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/requesthandler/RequestHandler_General.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,14 @@ RequestResult RequestHandler::CallVendorRequest(const Request &request)
}

/**
* Gets an array of all hotkey names in OBS
* Gets an array of all hotkey names in OBS.
*
* Note: Hotkey functionality in obs-websocket comes as-is, and we do not guarantee support if things are broken. In 9/10 usages of hotkey requests, there exists a better, more reliable method via other requests.
*
* @responseField hotkeys | Array<String> | Array of hotkey names
*
* @requestType GetHotkeyList
* @complexity 3
* @complexity 4
* @rpcVersion -1
* @initialVersion 5.0.0
* @category general
Expand All @@ -230,13 +232,15 @@ RequestResult RequestHandler::GetHotkeyList(const Request &)
}

/**
* Triggers a hotkey using its name. See `GetHotkeyList`
* Triggers a hotkey using its name. See `GetHotkeyList`.
*
* Note: Hotkey functionality in obs-websocket comes as-is, and we do not guarantee support if things are broken. In 9/10 usages of hotkey requests, there exists a better, more reliable method via other requests.
*
* @requestField hotkeyName | String | Name of the hotkey to trigger
* @requestField ?contextName | String | Name of context of the hotkey to trigger
*
* @requestType TriggerHotkeyByName
* @complexity 3
* @complexity 4
* @rpcVersion -1
* @initialVersion 5.0.0
* @category general
Expand Down Expand Up @@ -269,6 +273,8 @@ RequestResult RequestHandler::TriggerHotkeyByName(const Request &request)
/**
* Triggers a hotkey using a sequence of keys.
*
* Note: Hotkey functionality in obs-websocket comes as-is, and we do not guarantee support if things are broken. In 9/10 usages of hotkey requests, there exists a better, more reliable method via other requests.
*
* @requestField ?keyId | String | The OBS key ID to use. See https://github.com/obsproject/obs-studio/blob/master/libobs/obs-hotkeys.h | Not pressed
* @requestField ?keyModifiers | Object | Object containing key modifiers to apply | Ignored
* @requestField ?keyModifiers.shift | Boolean | Press Shift | Not pressed
Expand Down

0 comments on commit b53527c

Please sign in to comment.