toggleInteractionModeWhenCmdOrCtrlPressed function
ExecutionInstruction
toggleInteractionModeWhenCmdOrCtrlPressed({
- required EditContext editContext,
- required KeyEvent keyEvent,
Implementation
ExecutionInstruction toggleInteractionModeWhenCmdOrCtrlPressed({
required EditContext editContext,
required KeyEvent keyEvent,
}) {
if (keyEvent.isPrimaryShortcutKeyPressed && !editContext.composer.isInInteractionMode.value) {
editorKeyLog.fine("Activating editor interaction mode");
editContext.composer.isInInteractionMode.value = true;
} else if (editContext.composer.isInInteractionMode.value) {
editorKeyLog.fine("De-activating editor interaction mode");
editContext.composer.isInInteractionMode.value = false;
}
return ExecutionInstruction.continueExecution;
}