Overlays
Toolbar commands
These do the same thing as the matching Layout Mode toolbar button.
| Command | Action |
|---|---|
ToggleLayoutMode | Opens or closes Layout Mode. |
TogglePerformanceStats | Shows or hides the performance overlay. |
Create | Creates an overlay. |
CreateWebBrowser | Creates a web browser overlay. |
Recenter | Recenters the overlay space. |
Keyboard | Shows or hides the keyboard. |
Settings | Shows or hides the settings panel. |
DeleteAll | Deletes all overlays. |
WindowSwitcher | Opens the window switcher. |
WindowSettings | Shows the active overlay's settings. |
WindowSelect | Shows the active overlay's window picker. |
WindowDelete | Deletes the active overlay. |
The active overlay is the one whose toolbar was opened most recently.
send('ToggleLayoutMode');SetActiveOverlaySetting
Changes a setting on the active overlay. value is always a string.
internalName | value |
|---|---|
Pin, AutoHide, Lock, BlockInput | "true" or "false" |
Opacity, Brightness | 0 – 1 |
MaxFPS, MinFPS | Frame rate |
TrackingSpace | 0 World, 1 HMD, 2 Right Controller, 3 Left Controller |
CaptureSelect | Window ID from RequestWindowList |
See Overlays for what each one does.
send('SetActiveOverlaySetting', { jsonData: { internalName: 'Opacity', value: '0.5' } });RequestActiveOverlayInformation
The response is sent to every connected client, not only the one that asked.
on('UpdateActiveOverlayInformation', (overlay) => console.log(overlay.handle, overlay.opacity));
send('RequestActiveOverlayInformation');Response
{
windowId: number // -1 for web browser overlays
handle: number
key: string
isWebBrowserOverlay: boolean
browserId: number
displayName: string | null
trackingSpace: number // 0 World, 1 HMD, 2 Right Controller, 3 Left Controller
isPinned: boolean
isAutoHide: boolean
isLocked: boolean
isInputBlocked: boolean
brightness: number
opacity: number
activeFps: number
inactiveFps: number
}RequestWindowList
Windows and monitors that can be captured, keyed by window ID.
on('UpdateWindowList', (windows) => {
for (const window of Object.values(windows)) {
if (window) console.log(window.id, window.title);
}
});
send('RequestWindowList');Response
{
[windowId: string]: {
id: number
title: string
appName: string
icon: string // base64 image
isDesktop: boolean
isPrimaryDesktop: boolean
isUWP: boolean
isSystem: boolean
}
}RequestLayoutModeState
The response's rawData is "True" while Layout Mode is open, otherwise "False".
on('UpdateLayoutModeState', (_, rawData) => console.log('Layout Mode open:', rawData === 'True'));
send('RequestLayoutModeState');