Method GetHotkeysAsync
- Namespace
- OBSStudioClient.Model
- Assembly
- OBSClient.dll
GetHotkeysAsync(CancellationToken)
Asks OBS Studio for the names of its hotkeys.
public Task<IReadOnlyList<string>> GetHotkeysAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA token that ends the wait. A request that was not sent yet is not sent.
Returns
- Task<IReadOnlyList<string>>
The names, as TriggerHotkeyAsync(string, string?, CancellationToken) takes them (for example
ReplayBuffer.Save).
Remarks
The hotkeys that belong to a source (mute, push to talk, show and hide) are in the list with the name of the hotkey only, and the source that has it is not said: pass the source as the context of TriggerHotkeyAsync(string, string?, CancellationToken) (or use TriggerHotkeyAsync(string, CancellationToken) of the source). In most cases there is a better way to do what a hotkey does: a method of the model that does it.
Exceptions
- ObsNotConnectedException
There is no connection to OBS Studio.
- ObsNotReadyException
OBS Studio is changing its scene collection, or did so after the call.
- TimeoutException
OBS Studio did not answer in time (WriteTimeout).