You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have written a CLI application for Windows using the console family of libraries, also using dialoguer and indicatif. I kept running into an issue with some of my users, where the application would seemingly "freeze", but would "wake up" upon keypress (specifically ENTER). I originally though this was just the computer falling asleep, but on further review there is actually a well-known issue with "Quick Edit Mode" in Windows terminals:
unsafe {
let input_handle = GetStdHandle(STD_INPUT_HANDLE);
let mut mode: CONSOLE_MODE = 0;
if GetConsoleMode(input_handle, &mut mode) != 0 {
mode &= !ENABLE_QUICK_EDIT_MODE;
mode |= ENABLE_EXTENDED_FLAGS;
SetConsoleMode(input_handle, mode);
}
}
We seem to be doing some ConsoleMode manipulation already in windows_term/mod.rs...but it probably does not make sense to disable this behavior by default (some users may want the click and drag functionality that Quick Edit Mode provides).
But maybe it could somehow be an option when creating your Term? Or perhaps a note in the docs....or maybe the existence of this opened issue will be enough if anyone else runs into this behavior.
The text was updated successfully, but these errors were encountered:
I have written a CLI application for Windows using the
console
family of libraries, also usingdialoguer
andindicatif
. I kept running into an issue with some of my users, where the application would seemingly "freeze", but would "wake up" upon keypress (specifically ENTER). I originally though this was just the computer falling asleep, but on further review there is actually a well-known issue with "Quick Edit Mode" in Windows terminals:In my application I have disabled it:
We seem to be doing some ConsoleMode manipulation already in
windows_term/mod.rs
...but it probably does not make sense to disable this behavior by default (some users may want the click and drag functionality that Quick Edit Mode provides).But maybe it could somehow be an option when creating your
Term
? Or perhaps a note in the docs....or maybe the existence of this opened issue will be enough if anyone else runs into this behavior.The text was updated successfully, but these errors were encountered: