diff --git a/src/lib/commandCenter/commandCenter.svelte b/src/lib/commandCenter/commandCenter.svelte index 72a7bcd72..e13498a25 100644 --- a/src/lib/commandCenter/commandCenter.svelte +++ b/src/lib/commandCenter/commandCenter.svelte @@ -33,6 +33,9 @@ import { commandCenterKeyDownHandler, disableCommands, registerCommands } from './commands'; import { RootPanel } from './panels'; import { addSubPanel, clearSubPanels, subPanels } from './subPanels'; + import { addNotification } from '$lib/stores/notifications'; + + let debugOverlayEnabled = false; $: $registerCommands([ { @@ -40,6 +43,20 @@ keys: ['k'], ctrl: true, forceEnable: true + }, + { + label: 'Toggle debug overlay', + callback: () => { + debugOverlayEnabled = !debugOverlayEnabled; + addNotification({ + title: 'Debug overlay', + message: debugOverlayEnabled ? 'Enabled' : 'Disabled', + type: 'info' + }); + }, + keys: ['d', 'o'], + group: 'misc', + disabled: !dev } ]); @@ -100,7 +117,7 @@ {/if} -{#if dev} +{#if dev && debugOverlayEnabled}
{#each keys as key, i (i)}