External module "hotkeys"

Index

Type aliases

THotkeyType

THotkeyType: "GENERAL" | "SCENE" | "SCENE_ITEM" | "SOURCE"

Functions

getScenesService

getSourcesService

getStreamingService

Object literals

HOTKEY_ACTIONS

HOTKEY_ACTIONS: object

All possible hotkeys should be defined in this object. All information about the hotkey and its behavior is encapsulated within the action definition here.

WARNING: Changing the name of existing hotkey actions will cause people to lose their saved keybindings. The name shouldn't really change after it is added.

GENERAL

GENERAL: object[] = [{name: 'TOGGLE_START_STREAMING',description: () => 'Start Streaming',down: () => getStreamingService().toggleStreaming(),isActive: () => {const streamingService = getStreamingService();return streamingService.isStreaming;}},{name: 'TOGGLE_STOP_STREAMING',description: () => 'Stop Streaming',down: () => {const streamingService = getStreamingService();streamingService.toggleStreaming();},isActive: () => {const streamingService = getStreamingService();return !streamingService.isStreaming;}},{name: 'TOGGLE_START_RECORDING',description: () => 'Start Recording',down: () => getStreamingService().toggleRecording(),isActive: () => getStreamingService().isRecording},{name: 'TOGGLE_STOP_RECORDING',description: () => 'Stop Recording',down: () => getStreamingService().toggleRecording(),isActive: () => !getStreamingService().isRecording}]

SCENE

SCENE: object[] = [{name: 'SWITCH_TO_SCENE',description: () => 'Switch to scene',down: (sceneId) => getScenesService().makeSceneActive(sceneId)}]

SCENE_ITEM

SCENE_ITEM: object[] = [{name: 'TOGGLE_SOURCE_VISIBILITY_SHOW',description: (sceneItemId) => {const sceneItem = getScenesService().getSceneItem(sceneItemId);return `Show '${sceneItem.source.name}'`;},shouldApply: (sceneItemId) => getScenesService().getSceneItem(sceneItemId).video,isActive: (sceneItemId) => getScenesService().getSceneItem(sceneItemId).visible,down: (sceneItemId) => getScenesService().getSceneItem(sceneItemId).setVisibility(true)},{name: 'TOGGLE_SOURCE_VISIBILITY_HIDE',description: (sceneItemId) => {const sceneItem = getScenesService().getSceneItem(sceneItemId);return `Hide '${sceneItem.source.name}'`;},shouldApply: (sceneItemId) => getScenesService().getSceneItem(sceneItemId).video,isActive: (sceneItemId) => !getScenesService().getSceneItem(sceneItemId).visible,down: (sceneItemId) => getScenesService().getSceneItem(sceneItemId).setVisibility(false)}]

SOURCE

SOURCE: (object | object)[] = [{name: 'TOGGLE_MUTE',description: () => 'Mute',down: (sourceId) => getSourcesService().setMuted(sourceId, true),isActive: (sourceId) => getSourcesService().getSource(sourceId).muted,shouldApply: (sourceId) => getSourcesService().getSource(sourceId).audio},{name: 'TOGGLE_UNMUTE',description: () => 'Unmute',down: (sourceId) => getSourcesService().setMuted(sourceId, false),isActive: (sourceId) => !getSourcesService().getSource(sourceId).muted,shouldApply: (sourceId) => getSourcesService().getSource(sourceId).audio},{name: 'PUSH_TO_MUTE',description: () => 'Push to Mute',down: (sourceId) => getSourcesService().setMuted(sourceId, true),up: (sourceId) => getSourcesService().setMuted(sourceId, false),shouldApply: (sourceId) => getSourcesService().getSource(sourceId).audio},{name: 'PUSH_TO_TALK',description: () => 'Push to Talk',down: (sourceId) => getSourcesService().setMuted(sourceId, false),up: (sourceId) => getSourcesService().setMuted(sourceId, true),shouldApply: (sourceId) => getSourcesService().getSource(sourceId).audio}]