diff --git a/src/Components/Editor/Shortcuts.ts b/src/Components/Editor/Shortcuts.ts index aa20d96..f7d7b5b 100644 --- a/src/Components/Editor/Shortcuts.ts +++ b/src/Components/Editor/Shortcuts.ts @@ -1,5 +1,6 @@ import { Dispatch, SetStateAction } from 'react'; import { IHistoryState } from '../../Interfaces/IHistoryState'; +import { ENABLE_SHORTCUTS } from '../../utils/default'; export function onKeyDown( event: KeyboardEvent, @@ -7,6 +8,10 @@ export function onKeyDown( historyCurrentStep: number, setHistoryCurrentStep: Dispatch> ): void { + if (!ENABLE_SHORTCUTS) { + return; + } + event.preventDefault(); if (event.isComposing || event.keyCode === 229) { return;