diff --git a/src/components/cc-kv-terminal/cc-kv-terminal.js b/src/components/cc-kv-terminal/cc-kv-terminal.js index 4e1151de2..1d08921f0 100644 --- a/src/components/cc-kv-terminal/cc-kv-terminal.js +++ b/src/components/cc-kv-terminal/cc-kv-terminal.js @@ -141,7 +141,9 @@ export class CcKvTerminal extends LitElement { _onShellPromptKeyDown(e) { e.stopPropagation(); - if (e.key === 'Enter') { + const isCommandRunning = this.state.type === 'running'; + + if (e.key === 'Enter' && !isCommandRunning) { e.preventDefault(); this._cmdHistoryIndex = null; const commandLine = e.target.value.trim();