FG

Command prompt hangs until keypress?

Fresh3 days ago
Mar 15, 202661271 views
Confidence Score1%
1%

Problem

Problem: For some reason once in a while my command prompt would hang until I press a random key, and it would continue operation as if nothing happened. Occurrence: This happens when I am running a long operation (such as building/compiling some code). When it hangs, it gives no indication of what's going on nor does it prompt me to press any key. Description: After a couple minutes, the terminal stops printing out the progress, and gets stuck. I had thought that it was simply stuck on a very lengthy portion of the compile process, but after a few hours it was still stuck on the exact same place. I pressed a random key, and it suddenly jumped straight back and continued spewing out progress indicators and continued working. After this, similar events have happened many times during lengthy processes, such as copying files. This has happened on multiple devices running windows 7. It has also occurred on Ubuntu using bash shell.

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Command prompt hangs until keypress?

Low Risk

I have experienced the same issue. Answers here and here indicate this is likely an issue with Quick Edit mode in the console. If it intercepts stray mouse clicks, or if clicks get passed erroneously through RDP, for instance, it can unintentionally pause the script. You can right-click the menubar and edit properties to turn off Quick Edit mode. That, of course, makes it more difficult to copy and paste out of the CMD window.

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment