On Thu Feb 27 10:01:08 2025 +0000, Joe Souza wrote:
OK, latest change should fix it. Key was adding ENABLE_PROCESSED_INPUT in the call to SetConsoleMode. However, although this now allows Ctrl-C to break out of dir /p prompts, the user is still required to press a key to exit. This seems like a bug in wine to me. I haven't tried similar code on Windows and I don't have time to investigate further at the moment.
1) concerning the mode for waiting a key,
* ENABLE_PROCESS_INPUT is already set... default mode is 0x1f7 (so all flags except ENABLE_WINDOW_INPUT and ENABLE_VIRTUAL_TERMINAL_PROCESSING) * so IMO you just need to clear the ENABLE_LINE_INPUT flag to get key press without wating for end of line
2) for ctrl-c handling
* likely the ctrl-c is reported through the ctrl-c handler and it's not clear to me if native does break the read operation in this case and whether we should wait on both read operation & ctrl-c event